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 crosschain native value #1830

Merged
merged 4 commits into from
Feb 7, 2025
Merged

Conversation

BrodyHughes
Copy link
Member

@BrodyHughes BrodyHughes commented Feb 4, 2025

Fixes BX-1755
Figma link (if any):

What changed (plus any additional context for devs)

assetToSellWithPrice was incorrectly using assetToBuy?.uniqueId instead of assetToSell?.uniqueId. We only use this data when we create the object for parsedAssetToSell, which is returned as the assetToSell in our swaps flow.

Using assetToBuy?.uniqueId in assetToSellWithPrice caused us to check the native token price on the output chain instead of the input chain. This would only be noticeable for cross-chain swaps between chains that don't share a native token price.

Screen recordings / screenshots

Screen.Recording.2025-02-04.at.4.09.47.PM.mov

What to test

  • do swap price data work as expected for normal, crosschain, and wrapping / unwrapping?

Copy link

linear bot commented Feb 4, 2025

Copy link
Member

@derHowie derHowie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice find! now we gotta figure out why we're seeing NaN for gas fee at the end of the video 😅

@DanielSinclair DanielSinclair merged commit 33e12e1 into master Feb 7, 2025
11 of 14 checks passed
@DanielSinclair DanielSinclair deleted the brody/fix-crosschain-swap-native branch February 7, 2025 08:37
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.

3 participants