-
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: ETH transfers custom native token chains part 1 #2106
base: master
Are you sure you want to change the base?
Conversation
…e into token-query-params
…e into token-query-params
…ffchainLabs/arbitrum-token-bridge into token-query-params
…-token-bridge into eth-custom-orbit-1
@@ -48,6 +52,14 @@ function StyledLoader() { | |||
) | |||
} | |||
|
|||
function NativeTokenNetworkText({ chainId }: { chainId: number }) { |
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.
Moved to its own component from this file because it's reused now
@@ -136,18 +161,24 @@ function TokenListInfo({ token }: { token: ERC20BridgeToken | null }) { | |||
|
|||
interface TokenRowProps { | |||
style?: React.CSSProperties | |||
onTokenSelected: (token: ERC20BridgeToken | null) => void | |||
token: ERC20BridgeToken | null | |||
onTokenSelected: (parentErc20Address: string | null) => void |
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.
We pass the address to query params anyway, so there's no point passing the entire object. We also don't have to handle different types of token objects for erc20 or native currency, we only pass either address or key.
…e into eth-custom-orbit-1
Changes:
token=eth
, which will indicate that the selected token is ETH. This is becauseselectedToken === null
for custom native token chains by default indicates that the selected token is the custom native token. This way we can differentiate between the two.useIsSelectedTokenEther
hook, this will return true even ifselectedToken === null
but token query param istoken=eth
.