MetaMask / metamask-mobile

Mobile web browser providing access to websites that use the Ethereum blockchain
https://metamask.io
Other
2.14k stars 1.1k forks source link

[Bug]: Request url/QR generation fails on input validation #10904

Open hesterbruikman opened 1 month ago

hesterbruikman commented 1 month ago

Describe the bug

When going to Action menu > Receive > Request the user can generate an eip 681 payment request url/QR code by specifying a token and amount. When tapping Next a validation of the input happens. In some cases this validation results in an error being displayed with message 'invalid request, please try again'.

Issue occurs with Ethereum Mainnet and Linea selected.

Expected behavior

If the input is valid no error occurs.

Screenshots/Recordings

IMG_7797 Medium

Steps to reproduce

(Reported steps, was not able to reproduce)

  1. Tap Action menu
  2. Tap Receive
  3. Tap Request
  4. Select token
  5. Input Amount
  6. Tap Next

Error messages or log output

invalid request, please try again

Detection stage

In production (default)

Version

7.29.0

Build type

None

Device

iPhone

Operating system

iOS

Additional context

https://github.com/MetaMask/metamask-mobile/blob/main/app/components/UI/PaymentRequest/index.js

Severity

Unknown how many users are affected, likely not a commonly used feature, but not tracking available

hesterbruikman commented 1 month ago

@alfeng6 @darkwing please let me know if it makes sense to assign this to the assets team. The issue itself is on the Request flow which is owned by Wallet UX. Looking into the issue the cause of the error is validation on the input amount which seems to come from the asset controller.