Open
Conversation
…angeRates This breaks the snapshots until we upgrade exchangeRateActions to fix the keys in the exchangeRates object
| tokenIdStr = `_${tokenIdStr}` | ||
| } | ||
| const key = `${pair.asset.pluginId}${tokenIdStr}_${pair.targetFiat}${dateStr}` | ||
| cryptoPairMap.set(key, pair) |
There was a problem hiding this comment.
Bug: Crypto Pair Token ID Construction Error
In addCryptoPair, the tokenIdStr is incorrectly constructed. It assigns tokenIdStr = '_${tokenIdStr}' when tokenIdStr is empty, resulting in just _ instead of including pair.asset.tokenId. This generates incorrect rate keys, which can cause exchange rate lookups for token assets to fail.
Additional Locations (1)
| const RATES_SERVERS = ['https://rates1.edge.app', 'https://rates2.edge.app'] | ||
| // const RATES_SERVERS = ['https://rates3.edge.app', 'https://rates4.edge.app'] | ||
| // const RATES_SERVERS = ['http://10.0.2.2:8087'] | ||
| const RATES_SERVERS = ['http://127.0.0.1:8087'] |
There was a problem hiding this comment.
| cryptoCurrencyCode | ||
| wallet.currencyInfo.pluginId, | ||
| tokenId, | ||
| defaultIsoFiat |
There was a problem hiding this comment.
Bug: Fiat-to-Crypto Conversion Error
The convertFromFiat function in SwapInput.tsx and ExchangedFlipInput2.tsx misuses convertCurrency. This function is designed for crypto-to-fiat conversions, but it's called for fiat-to-crypto, leading to incorrect exchange amounts when users input fiat values.
Additional Locations (1)
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.
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneRequirements
If you have made any visual changes to the GUI. Make sure you have: