Merged
Conversation
The daemon.thorchain.shapeshift.com domain has been deprecated. Updated to use api.thorchain.shapeshift.com which is the correct endpoint, matching the fix applied to the main web repo in commit 7de6e916af. Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* fix: fix Solana swap rates in trading widget - Remove outdated blocking logic that prevented SOL→BTC, SOL→ETH, and ETH→SOL pairs from fetching quotes - Add getChainflipAssetId helper to map token/chain combinations to correct Chainflip asset identifiers (e.g., ETH on any chain maps to Eth.Eth since Chainflip only supports ETH on Ethereum mainnet) Chainflip now supports all these pairs and returns valid quotes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: use correct decimals for Chainflip API requests SOL → ETH swaps were failing because the amount calculation used the destination token's decimals instead of the source token's native decimals. Added getChainflipDecimals helper to return correct decimals for each asset (SOL=9, BTC=8, ETH=18, USDT=6). Co-Authored-By: Claude <noreply@anthropic.com> * fix: use BigInt for Chainflip amount to avoid scientific notation JavaScript's Number type can produce scientific notation (1e+18) for large numbers when converted to string, which the Chainflip API may not parse correctly. Using BigInt ensures the amount is formatted as a proper integer string (1000000000000000000). Co-Authored-By: Claude <noreply@anthropic.com> * fix: use correct decimals for output amount display For Chainflip swaps (Solana involved), use getChainflipDecimals for the destination token. For THORChain swaps, use the existing decimals lookup. This fixes the output showing in scientific notation. Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: enable Solana swaps via Chainflip with correct decimals (#91)
fix: update thorchain api endpoint in swap widget (#90)