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

Metamask says it only allows tokens with symbol between 0 and 12 chars, but doesn't allow 12 chars #7668

Closed
wmitsuda opened this issue Dec 9, 2019 · 2 comments · Fixed by #7672

Comments

@wmitsuda
Copy link

wmitsuda commented Dec 9, 2019

Describe the bug
It is as the bug title says

To Reproduce

  1. Add a custom token on Metamask
  2. Paste 0x66117f59814DC7f2AaA7A2f90F6ef16F7e2b363D as the token contract address (mainnet)
  3. This token symbol has exactly 12 characters
  4. The extension complains saying it should be between 0 and 12 characters.
  5. If you edit the name and remove 1 character (so it has 11), it accepts the symbol.

Expected behavior
The extension should support 12 characters in the symbol as the error message says.

Screenshots
image

Browser details (please complete the following information):

  • OS: macos Catalina
  • Browser: Chrome
  • MetaMask Version: 7.7.0.1
@Gudahtt
Copy link
Member

Gudahtt commented Dec 9, 2019

The behaviour here does match the error message, though I can see why it would be confusing. It means it should be between 0 and 12 characters exclusive, as in greater than 0 or less than 12. Hence zero not being accepted either.

I think ranges of numbers are generally assumed to be inclusive unless stated otherwise, so this error message should be changed to something easier to understand, e.g. "greater than zero and less than 12 characters"

@wmitsuda
Copy link
Author

wmitsuda commented Dec 9, 2019

May I ask why the limit should be 11 and not 12 then? Is there some specification stating these limits?

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

Successfully merging a pull request may close this issue.

2 participants