metamask-extension icon indicating copy to clipboard operation
metamask-extension copied to clipboard

[Bug]: I am able to input negative values to tx amount. Error: new BigNumber() not a base 16 number

Open seaona opened this issue 3 years ago • 0 comments

Describe the bug

Problem: when I am Sending a tx I can introduce negative numbers by pressing the down arrow of my keyboard. This eventually leads to a tx with 0 value. I guess input should be validated and if negative, we should not be able to proceed to the Confirmation Screen.

The error Uncaught (in promise) BigNumber Error: new BigNumber() not a base 16 number: appears on the console.

https://user-images.githubusercontent.com/54408225/182885986-d86de6f6-6e74-45c6-87fe-c662d5923904.mp4

Steps to reproduce

  1. Unlock MM
  2. Click Send
  3. Introduce any recipient
  4. Click Amount and input a random number
  5. Press down arrow key for a couple of times

Error messages or log output

Uncaught (in promise) BigNumber Error: new BigNumber() not a base 16 number: No response

Version

10.18.2

Build type

No response

Browser

Chrome

Operating system

Linux

Hardware wallet

No response

Additional context

No response

seaona avatar Aug 04 '22 15:08 seaona