-
Notifications
You must be signed in to change notification settings - Fork 211
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
feat: show token tooltip in transfer summary #2202
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -20,7 +20,7 @@ import { useTokensFromLists, useTokensFromUser } from './TokenSearchUtils' | |||
|
|||
export type TokenButtonOptions = { | |||
symbol?: string | |||
logoSrc?: string | |||
logoSrc?: string | null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null
is used if we want to show native currency, otherwise selected token is show as the token logo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file hasn't been used anywhere at all
packages/arb-token-bridge-ui/src/components/TransferPanel/TokenInfoTooltip.tsx
Outdated
Show resolved
Hide resolved
packages/arb-token-bridge-ui/src/components/TransferPanel/TokenInfoTooltip.tsx
Outdated
Show resolved
Hide resolved
packages/arb-token-bridge-ui/src/components/TransferPanel/TokenInfoTooltip.tsx
Show resolved
Hide resolved
packages/arb-token-bridge-ui/src/components/TransferPanel/TokenInfoTooltip.tsx
Outdated
Show resolved
Hide resolved
packages/arb-token-bridge-ui/src/components/TransferPanel/TokenInfoTooltip.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very nice
return token?.isL2Native ? ( | ||
<BlockExplorerTokenLink chain={childChain} address={token.address} /> | ||
<BlockExplorerTokenLink chainId={childChain.id} address={token.address} /> | ||
) : ( | ||
<BlockExplorerTokenLink chain={parentChain} address={token.address} /> | ||
<BlockExplorerTokenLink | ||
chainId={parentChain.id} | ||
address={token.address} | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: you can simplify this to
<BlockExplorerTokenLink
chainId={
token?.isL2Native
? networks.destinationChain.id
: networks.sourceChain.id
}
address={token.address}
/>
No description provided.