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

fix: select the first token from the chain selected #2156

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

juanmahidalgo
Copy link
Contributor

No description provided.

Copy link

vercel bot commented Feb 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marketplace ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 27, 2024 4:31pm

@@ -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(
Copy link
Contributor Author

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 &&
Copy link
Contributor Author

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

@coveralls
Copy link

Coverage Status

coverage: 65.894% (-0.1%) from 66.015%
when pulling 3778685 on fix/cross-chain-default-token
into b880f0b on master.

@juanmahidalgo juanmahidalgo merged commit 93415ca into master Feb 27, 2024
7 checks passed
@juanmahidalgo juanmahidalgo deleted the fix/cross-chain-default-token branch February 27, 2024 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants