-
Notifications
You must be signed in to change notification settings - Fork 635
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
bsc: fix improper decimals #5097
Conversation
APP-746 BSC Stablecoin swaps and bridges have decimal or other issue causing wild quotes
It looks like Stablecoin swaps on BSC and bridges to BSC Stables are off by a factor 10e12 or so Wayne reports that the decimals reported by the backend are correct.
grant said:
|
rainbowTokenList.RAINBOW_TOKEN_LIST[tokenAddress.toLowerCase()]; | ||
|
||
// delete chain metadata | ||
return omitFlatten(metadata, ['chainId', 'decimals']); |
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.
can you help me understand how decimals
which should be omitted here would impact the other flows?
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.
it wasn't being omitted, we've had a bunch of issues with this previously when we added BSC which you and I looked into and then had to pull bruno in
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.
we shouldn't be using the token list as a source of truth for anything anyways
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.
🌮
Fixes APP-746
What changed (plus any additional context for devs)
We had come across this previously but I think the new RN version and js changes are made it moot, its all stemming from the rainbow token list which we should be removing entirely
unfortunately that is not as easy as a task since its ref'd in a bunch of places
ive gone ahead and just rugged the util we use to read token metadata from it which fixes this issue, shouldn't affect anything else this data is already being used upstream in the BE, albeit some of that data isn't being used like color data
Screen recordings / screenshots
https://cloud.skylarbarrera.com/Screen-Shot-2023-10-04-12-26-21.04.png
What to test
swapping to usdt on bsc should look normal