1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/ui
Thomas Huang d179344712
Convert token input to BigNumber to handle decimals. (#12773)
* Fixes #12762

Adds a decimal length check for inputs and drops excess fractional part.
Another edgecase not accounted for is when a token's decimal precision is 0 and attempting sending decimals will result in omitting the fractional part.

* Change spies from sinon to jest and change onChange value to string.

* Adjust

* Remove sinon

* Add test for issue case

* DRY

* Simplify logic by using BigNumber

Co-authored-by: Dan Miller <danjm.com@gmail.com>
2021-11-24 12:08:23 -06:00
..
__mocks__
components Convert token input to BigNumber to handle decimals. (#12773) 2021-11-24 12:08:23 -06:00
contexts Adding the AdvancedGasFeePopover template (#12780) 2021-11-23 23:16:33 +05:30
css Adding network status section on edit gas fee modal (#12704) 2021-11-23 22:22:50 +05:30
ducks Ensure the test network dismissal message in the network dropdown is permanently dismissed (#12723) 2021-11-16 18:52:01 -03:30
helpers Clear the clipboard after the seed phrase is pasted (#12828) 2021-11-24 13:39:12 -03:30
hooks Confirm transaction page - onchain failure handling (#12743) 2021-11-24 22:32:53 +05:30
pages Clear the clipboard after the seed phrase is pasted (#12828) 2021-11-24 13:39:12 -03:30
selectors Introduce QR based signer into MetaMask (#12065) 2021-11-23 13:58:39 -03:30
store Introduce QR based signer into MetaMask (#12065) 2021-11-23 13:58:39 -03:30
1.INTRODUCTION.stories.mdx
2.DOCUMENTATION.stories.mdx
index.js