MetaMask / MetaMask/metamask-extension

Use red frame for transaction parameters only when value is problematic

Open
#8,807 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs-design type-enhancement
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

**Describe the bug**
About half of the time, when you send ETH or tokens and you change transaction parameters (modifying gas price, the gas limit, or even just entering the amount), the text box you edited gets a red glow. This is regardless whether the value is problematic or not.

**To Reproduce**
Note: I couldn't find a consistent way to reproduce this, for now, it's by trial and error.

1. Initiate a send
2. Modify parameters

**Expected behavior**
The red rectangle should be applied only if the user doesn't have enough funds to make the transaction, the specified gas price is extremely low, the gas limit is under MM's estimate, or the entered value looks invalid/mistaken (has letters, multiple decimal points, leading zeros, would overflow, etc.)

**Screenshots**
![send-flow](https://user-images.githubusercontent.com/7106231/84599782-eafb5280-ae74-11ea-84ee-69b4d69b94cf.png)

**Browser details (please complete the following information):**
- Firefox 68.0 64-bit
- MetaMask Version 7.7.9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the send flow in the current extension and trace how transaction-parameter validation controls the red field styling. Compare edits to gas price, gas limit, and amount against the stated invalid-value and insufficient-funds cases; done means valid values no longer receive the red frame while problematic values still do.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.