1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +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__ Increase Jest unit test coverage for the Swaps feature to ~60% (#11343) 2021-07-02 08:48:34 -05:00
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 Docs/12367 Adding storybook essentials addons (#12393) 2021-10-29 07:22:07 -10:00
2.DOCUMENTATION.stories.mdx Docs/12367 Adding storybook essentials addons (#12393) 2021-10-29 07:22:07 -10:00
index.js remove the ui/app and ui/lib folders (#10911) 2021-04-28 14:53:59 -05:00