-
Notifications
You must be signed in to change notification settings - Fork 271
Use rates v3 #5698
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
base: develop
Are you sure you want to change the base?
Use rates v3 #5698
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cryptoCurrencyCode | ||
wallet.currencyInfo.pluginId, | ||
tokenId, | ||
defaultIsoFiat |
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.
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.
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: