Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quicker retrieval of symbol #357

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -199,7 +199,7 @@ const BridgeView = ({
</div>
</div>
<ValueToBridge
symbol={tokenInformation?.symbol ?? ''}
symbol={selectedBridgeToken?.symbol}
value={value}
setValue={setValue}
balance={tokenInformation?.tokenBalance}
@@ -239,7 +239,6 @@ const BridgeView = ({
childFee={Number(estimatedFee.data?.childFee ?? 0)}
isEstimatingFee={estimatedFee.isFetching}
value={Number(value)}
tokenSymbol={tokenInformation?.symbol ?? ''}
gasNativeTokenSymbol={
selectedNativeToken?.symbol ?? ''
}
@@ -248,7 +247,7 @@ const BridgeView = ({
}
selectedLowChain={selectedLowNetwork}
selectedHighChain={selectedHighNetwork}

selectedBridgeTokenSymbol={selectedBridgeToken.symbol}
/>
{networkErrorMessage && <div className={styles.networkErrorMessage}>{networkErrorMessage}</div>}
{<div className={styles.manualGasMessageContainer}>
Original file line number Diff line number Diff line change
@@ -4,22 +4,21 @@ import { Tooltip, useClipboard } from 'summon-ui/mantine'
import { mantineBreakpoints } from '@/styles/breakpoints'
import { useMediaQuery } from '@mantine/hooks'
import { NetworkInterface } from '@/contexts/BlockchainContext'
import { returnSymbol } from '@/utils/web3utils'

interface TransactionSummaryProps {
address: string | undefined
transferTime: string
fee: number
isEstimatingFee: boolean
value: number
nativeBalance: number
tokenSymbol: string
tokenSymbol?: string
gasNativeTokenSymbol: string
gasChildNativeTokenSymbol: string
direction: 'DEPOSIT' | 'WITHDRAW'
selectedLowChain: NetworkInterface
selectedHighChain: NetworkInterface
childFee: number
selectedBridgeTokenSymbol: string
}
const TransactionSummary: React.FC<TransactionSummaryProps> = ({
direction,
@@ -28,13 +27,13 @@ const TransactionSummary: React.FC<TransactionSummaryProps> = ({
transferTime,
fee,
isEstimatingFee,
tokenSymbol,
gasNativeTokenSymbol,
gasChildNativeTokenSymbol,
value,
selectedHighChain,
selectedLowChain,
childFee
childFee,
selectedBridgeTokenSymbol
}) => {
const clipboard = useClipboard({ timeout: 700 })

@@ -149,7 +148,7 @@ const TransactionSummary: React.FC<TransactionSummaryProps> = ({
<div className={styles.itemName}>You will receive</div>
<div className={styles.valueContainer}>
<div className={styles.value}>
{`${value} ${returnSymbol(direction, selectedHighChain, selectedLowChain, tokenSymbol)}`}
{`${value} ${selectedBridgeTokenSymbol}`}
</div>
</div>
</div>