Skip to content

Commit

Permalink
Merge pull request #271 from G7DAO/feat/update-bridge-sdk
Browse files Browse the repository at this point in the history
Feat/update bridge sdk
  • Loading branch information
elclandestin0 authored Jan 7, 2025
2 parents 079721f + ac6149e commit b57f726
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,6 @@
/* 150% */
}

.manualGasMessageTooltip {
background: #B54708;
}

@media (max-width: 1199px) {
.container {
width: 100%;
Expand All @@ -285,4 +281,13 @@
.arrowIcon {
display: none;
}
}

.customTooltip {
max-width: 200px;
padding: 10px;
border-radius: 8px;
white-space: normal;
overflow: hidden;
text-align: center;
}
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,6 @@ const BridgeView = ({

return (
<div className={styles.container}>
<div className={styles.headerContainer}>
<div className={styles.subtitle}>Move assets between different blockchains</div>
</div>
<div className={styles.directionContainer}>
<button
className={direction === 'DEPOSIT' ? styles.selectedDirectionButton : styles.directionButton}
Expand Down Expand Up @@ -285,14 +282,15 @@ const BridgeView = ({
Claim transaction may be required on {selectedHighNetwork.displayName}
</div>
<Tooltip
content={`
Gas requirements may change on the destination chain, requiring manual completion. Check the Activity tab for updates.
`}
label=' Gas requirements may change on the destination chain, requiring manual completion. Check the Activity tab for updates.'
position='top'
className={styles.manualGasMessageTooltip}
multiline
radius={'8px'}
arrowSize={8}
withArrow
arrowOffset={14}
events={{ hover: true, focus: true, touch: true }}
label='Gas requirements may change on the destination chain, requiring manual completion. Check the Activity tab for updates.'
>
<IconAlertCircle stroke='#FFFAEB' height={12} width={12} />
<IconAlertCircle stroke='#FFFAEB' height={16} width={16} />
</Tooltip>
</div>}
<ActionButton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ const TransactionSummary: React.FC<TransactionSummaryProps> = ({
<div className={styles.dataRow}>
<div className={styles.itemName}>You will receive</div>
<div className={styles.valueContainer}>
<div className={styles.value}>{`${value} ${tokenSymbol}`}</div>
<div className={styles.value}>
{`${value} ${tokenSymbol.startsWith('USDC') ? (tokenSymbol === 'USDC.e' ? 'USDC' : 'USDC.e') : tokenSymbol}`}
</div>
{tokenRate > 0 && <div className={styles.valueNote}>{formatCurrency(value * (tokenSymbol === 'ETH' || tokenSymbol === 'G7' || tokenSymbol === 'TG7T' ? ethRate : tokenRate))}</div>}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const HistoryDesktop: React.FC<HistoryDesktopProps> = () => {
const localTransactions = messages || []
const formattedApiTransactions = apiTransactions ? apiTransactions.map(apiDataToTransactionRecord) : []
const combinedTransactions = mergeTransactions(formattedApiTransactions, localTransactions)

console.log(formattedApiTransactions)
// Check if the combined transactions are different from those in localStorage
if (
combinedTransactions.length !== localTransactions.length ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface NotificationsDropModalProps {
const copy = (notification: BridgeNotification, selectedNetworkType: NetworkType) => {
const targetNetwork = getNetwork(notification.to, selectedNetworkType)?.displayName ?? 'unknown chain'
if (notification.status === 'CLAIMABLE') {
return `Heads Up: Your ${notification.amount} ${notification.tx.transactionInputs?.tokenSymbol ? notification.tx.transactionInputs?.tokenSymbol : ''} withdrawal is complete and you can now claim your assets`
return `Your ${notification.amount} ${notification.tx.transactionInputs?.tokenSymbol ? notification.tx.transactionInputs?.tokenSymbol : ''} withdrawal is ready to complete. Claim your token in Activity.`
}
if (notification.status === 'COMPLETED') {
if (notification.type === 'DEPOSIT') {
Expand Down

0 comments on commit b57f726

Please sign in to comment.