Skip to content

[Bug]: Deeplinks - When interacting with a contract in another network, MM stays loading indefinetly and get Error: Approval request with id 'undefined' not found. #9260

@seaona

Description

@seaona

Describe the bug

Whenever I am triggering a contract interaction with a Deeplink (Approve ERC20 / Transfer ERC20), if my wallet is in another network (where that contract does not exist), I get the error Error: Approval request with id 'undefined' not found. and MM stays loading indefinetly

Expected behavior

We should handle this cases so the wallet doesn't break.

  • On Mobile, if we are not using deeplinks, we don't allow the popup to open for such cases
  • On Extension, we display a simple send (if the contract does not exist, the address will be an EOA) with hex data embedded (the hex data corresponding to that contract interaction) --> I think this would be the correct way of fixing those cases

Screenshots/Recordings

approval-request-undefined.mp4

Extension way of handling this:

Screenshot from 2024-04-16 15-04-21

Steps to reproduce

  1. Select Linea testnet in MM wallet
  2. Open the browser (not the inner MM browser)
  3. Go to https://metamask.github.io/test-dapp/?contract=0x8aAF999b9bDf4BF6E5fAa267D635898C7208993B&decimals=4
  4. Click transfer
  5. See error and MM stays loading indefinetly

Error messages or log output

No response

Version

7.20 prod but it's an old issue

Build type

None

Device

Pixel 6

Operating system

Android

Additional context

No response

Severity

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Sev2-normalAn issue that may lead to users misunderstanding some limited risks they are takingstaleIssues that have not had activity in the last 90 daysteam-confirmationsPush issues to confirmations teamtype-bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions