MetaMask / MetaMask/metamask-mobile

Parse amount from ETH QR string in the Send To view

Open
#4,332 1 comment 0 reactions 0 assignees View on GitHub
area-transactions feature-request team-confirmations-planning
Dominant language
TypeScript
Stars
3k
Forks
1.7k
Avg merge
1d 14h
Merged PRs (30d)
669

Description

### **Description**

Currently, Metamask mobile does not extract the amount from an ETH QR string that contains the price in addition to the address in the Send To view. It would be convenient for the amount to be pre-populated so that the user does not have to enter it manually. Usually, these values are very complicated, and it's cumbersome and difficult to enter them correctly.

### **Technical Details**

- Modify QR scanning code to parse the amount in an address string that contains this value. An example of such string could look like this `ethereum:

[?value=]`.

### **Acceptance Criteria**

- When scanning an ETH QR code that includes the amount, this value has to be automatically populated in the UI where the amount is currently entered.

Scenario:
- GIVEN a QR code that encodes an amount
- WHEN a user scans the QR, the value appears pre-populated in Metamask in the screen where it has to be entered by the user.
- AND user does not need to enter an amount to send the transaction

### **References**

- [ERC: Standard URI scheme with metadata, value and byte code](https://github.com/ethereum/EIPs/issues/67)
- [ethereum-qr-code](https://github.com/jibrelnetwork/ethereum-qr-code)

Contributor guide

Open the contributing guide

Research direction

Start by tracing the QR scanning code into the Send To view in the MetaMask mobile app. Check how an Ethereum URI such as ethereum:

[?value=] is currently handled, then verify that a scanned URI containing a value pre-populates the amount field and does not require manual entry.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.