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

Support Metamask address QRs #19986

Open
xAlisher opened this issue May 11, 2024 · 3 comments
Open

Support Metamask address QRs #19986

xAlisher opened this issue May 11, 2024 · 3 comments
Assignees
Labels
feature feature requests

Comments

@xAlisher
Copy link

xAlisher commented May 11, 2024

User Story

As a Status app user, I want to be able to scan Metamask QR addresses, so I can send assets or save the address, if Status supports the network.

Description

Metamask stores addresses in QR codes with the following format:
ethereum:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2@0xa

ethereum: - prefix described in EIP-67
0xa - chain ID suffix described in EIP-155

Since Status addresses do not include these parts, we need to convert the data from Metamask QR addresses to a format our app can work with for sending, saving, and editing network preferences.

Conversion

  1. ethereum: - prefix should be ignored and removed on our side

  2. Status addresses follow the EIP-3770 format, which maps hexadecimal chain IDs to readable chain prefixes.

Name EIP-155 (HEX) DEC EIP-3770
Mainnet 0x1 1 eth:
Binance Smart Chain 0x38 56 bsc:
Linea 0xe708 59144 linea:
Polygon 0x89 137 matic:
Arbitrum 0xa4b1 42161 arb1:
Optimism 0xa 10 oeth:

More networks: chains_mini.json file on chainid.network

After converting, ethereum:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2@0xa should become oeth:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2

This conversion should happen in all instances of scanning addresses, such as

  • universal scanner on home pages
  • scanner for saving addresses in wallet settings
  • scanner for sending

It should be implemented on all supported platforms.

If the address contains an unsupported network, the user should receive an error "Address contains unsupported network" Users should not be able to save addresses with unsupported network prefixes to avoid problems in the send flow and sending assets to wrong networks.

Implementation.

  1. Design cases for all relevant instances of QR scanner in Figma
  2. Implement the conversion and validation logic
  3. Submit the feature for review and approval by the Status QA team

Acceptance Criteria

  • User scans Metamask QR addresses with relevant scanner instances
  • Chain IDs are converted to prefixes according to EIP-3770
  • ethereum: prefix is ignored and removed from address
  • User receives a designated error for unsupported networks
  • User can save addresses with supported and unsupported network prefixes

Future Steps
Consider supporting Metamask's "Payment request" QR format including additional data like requested amount and token ID.

@xAlisher xAlisher added the feature feature requests label May 11, 2024
@xAlisher xAlisher self-assigned this May 11, 2024
@xAlisher
Copy link
Author

xAlisher commented May 13, 2024

After discussing this issue with John it needs to be updated. Hold on...

@churik churik added the blocked label May 13, 2024
@churik
Copy link
Member

churik commented May 13, 2024

put the label "blocked" when it is under the discussion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature feature requests
Development

No branches or pull requests

2 participants