[Bug]: Not allowed to add a new network where the symbol (ticker) consists of one letter #11217
Labels
external-contributor
Sev2-normal
An issue that may lead to users misunderstanding some limited risks they are taking
team-assets
type-bug
Something isn't working
Describe the bug
When switching to a network that is not yet added to MM, it asks the user to add it. That works fine for any network, but not if the symbol (such as ETH) is one character long. This is a big problem with the upcoming Sonic (https://www.soniclabs.com) that will go live in Nov/Dec 2024, and may be the first network to use one-letter ticker. The ticker/symbol is S in this case.
Using $S, SS or SSS works fine, but not just S. It also works fine adding it in the chrome version of MM (or other wallets), but not in the mobile version of MM which makes me believe this is an unintended error.
I'm using the built-in browser in metamask, so I don't think this relies on the WalletConnect API since it uses the injected provider. And it fails the same way if connecting over WalletConnect from another browser.
Expected behavior
It should ask the user to add the new network, not refusing because of a short symbol.
Screenshots/Recordings
This is the expected screenshot when using a longer symbol like $S:
Steps to reproduce
Minimal reproduction. Maybe this sandbox won't work on mobile, but it can be downloaded and run locally. See the index.tsx under config for how the symbol is defined.
https://stackblitz.com/edit/stackblitz-starters-x16geb?file=config%2Findex.tsx
Error messages or log output
Switch can be declined if chain is not supported by a wallet
Detection stage
In production (default)
Version
7.30.0 (1410)
Build type
None
Device
iPhone 14 pro max
Operating system
iOS
Additional context
The same issue can be seen on https://testnet.soniclabs.com/account when adding the testnet to MM mobile (as long as they are using symbol S).
Severity
It will be severe when the network goes live because the symbol is set to be S, but if nobody can use the network on mobile, it's a serious issue for any developer given it's very hard to track down what the cause is.
The text was updated successfully, but these errors were encountered: