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

bsc: fix improper decimals #5097

Merged
merged 4 commits into from
Oct 10, 2023
Merged

bsc: fix improper decimals #5097

merged 4 commits into from
Oct 10, 2023

Conversation

skylarbarrera
Copy link
Contributor

@skylarbarrera skylarbarrera commented Oct 4, 2023

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

@linear
Copy link

linear bot commented Oct 4, 2023

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.

client-side regression, not backend related

token-search returns proper decimals for BSC USD

grant said:

benjamin saw this on the bx and I reproduced in the iOS app, looks like a regression to me

https://rainbowhaus.slack.com/archives/C04M9BUPQP6/p1694472224625679?thread_ts=1694471116.921139&cid=C04M9BUPQP6

[September 11th, 2023 3:43 PM] grant: Might be a regression to that BSC bug that we had when we added BSC swaps - I see it in app too

rainbowTokenList.RAINBOW_TOKEN_LIST[tokenAddress.toLowerCase()];

// delete chain metadata
return omitFlatten(metadata, ['chainId', 'decimals']);
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Contributor Author

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

@skylarbarrera skylarbarrera requested a review from jinchung October 6, 2023 15:11
Copy link
Member

@jinchung jinchung left a comment

Choose a reason for hiding this comment

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

🌮

@jinchung jinchung merged commit a631e40 into develop Oct 10, 2023
4 of 5 checks passed
@jinchung jinchung deleted the @skylar/rm-token-list branch October 10, 2023 17:02
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.

2 participants