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

Negative gas price breaks the extension #8492

Closed
sterlu opened this issue May 1, 2020 · 0 comments · Fixed by #8533
Closed

Negative gas price breaks the extension #8492

sterlu opened this issue May 1, 2020 · 0 comments · Fixed by #8533
Labels

Comments

@sterlu
Copy link

sterlu commented May 1, 2020

Describe the bug
When signing a transaction, entering a negative gas price will break the extension. The tx confirmation window will freeze and opening the UI will render an empty screen. In the console, a BigNumber constructor error message will be displayed due to it being created with a negative hex value.

I've eventually worked around this by disabling the extension, switching to Kovan, entering the password to log in, opening settings, and reseting the account.

To Reproduce

  1. Create a transaction to send (for example, send 0 ETH to yourself)
  2. On the tx confirmation screen, with the gas price in focus, tap the Down arrow on the keyboard to decrease the price, going below 0
  3. The UI should presend an infinitely loading overlay; closing the pop-up and opening the UI again should render a blank screen

Expected behavior
Gas price input should prevent the user from entering a negative value.

Browser details (please complete the following information):

  • OS: Mac OS
  • Browser: Chrome 81.0.4044.129 (Official Build) (64-bit)
  • MetaMask Version: 7.7.8
tmashuang added a commit that referenced this issue May 6, 2020
Adds min value for input in the advanced-gas-inputs component to prevent users from entering negative values on keypress, change, etc.
tmashuang added a commit that referenced this issue May 6, 2020
Adds min value for input in the advanced-gas-inputs component to prevent users from entering negative values on keypress, change, etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants