-
Notifications
You must be signed in to change notification settings - Fork 646
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
fix: select the first token from the chain selected #2156
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -225,7 +225,10 @@ export const BuyWithCryptoModal = (props: Props) => { | |||
manaTokenOnSelectedChain || getMANAToken(selectedChain) | |||
) // if it's not in the providerTokens, create the object manually with the right conectract address | |||
} catch (error) { | |||
setSelectedToken(providerTokens[0]) | |||
const selectedChainTokens = providerTokens.filter( |
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.
pick the first token from the selected chain, otherwise it can belong to other one
@@ -796,7 +799,9 @@ export const BuyWithCryptoModal = (props: Props) => { | |||
})} | |||
</span> | |||
) : null} | |||
{!canBuyAsset && !isFetchingBalance && !isFetchingRoute ? ( | |||
{canBuyAsset === false && |
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.
canBuyAsset
must be computed, it starts at undefined
, at that value, we don't know if it has funds or not for the tx
No description provided.