rainbow-me / rainbow

🌈‒ the Ethereum wallet that lives in your pocket
https://rainbow.me
GNU General Public License v3.0
3.82k stars 590 forks source link

Math related fixes #5837

Closed brunobar79 closed 2 weeks ago

brunobar79 commented 3 weeks ago

Fixes APP-1570 Fixes RNBW-4788 Fixes APP-1587

What changed (plus any additional context for devs)

Screen recordings / screenshots

https://github.com/rainbow-me/rainbow/assets/1247834/d9c45d7c-6151-450a-b418-e1e6fc575fb1

https://github.com/rainbow-me/rainbow/assets/1247834/3e52536a-6ca2-4940-8e5a-0503cd2eb6ef

https://github.com/rainbow-me/rainbow/assets/1247834/8e2fe0fa-6716-437f-9372-0d9416e29303

What to test

linear[bot] commented 3 weeks ago

RNBW-4788 Issue with rounding

APP-1570 Input Assets with small native price and small balance get set to 0 inputAmount

linear[bot] commented 3 weeks ago

APP-1587 SafeMath crash when input is very large

walmat commented 2 weeks ago

Rounding 50% of small fractions is back to being wonky on this branch.

this branch

Screenshot 2024-06-12 at 11 58 13 AM

develop

Screenshot 2024-06-12 at 12 00 16 PM
brunobar79 commented 2 weeks ago

Rounding 50% of small fractions is back to being wonky on this branch.

Fixed. Pow:

Screenshot 2024-06-12 at 5 31 14 PM