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

[bug] Metamask icon is undefined and name is not user friendly #3569

Open
val-o opened this issue Jan 3, 2025 · 1 comment
Open

[bug] Metamask icon is undefined and name is not user friendly #3569

val-o opened this issue Jan 3, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@val-o
Copy link

val-o commented Jan 3, 2025

Link to minimal reproducible example

https://codesandbox.io/p/sandbox/98s68n

Summary

Steps:

  • Connect metamask wallet
  • Check console

Expected Output: {name: "Metamask", icon: "someUrl"}
Got: {name: 'io.metamask'}

This is due to a bad mapping between wagmi's connector.type field ('injected') and appKit's contants value which is uppercased version of the same string "INJECTED"

The exact location where the condition fails and fallsback to connector id(io.metamask) -

providerType === UtilConstantsUtil.CONNECTOR_TYPE_INJECTED

This leads to skipping downoading metadata with proper name and icon

List of related npm package versions

"wagmi": "^2.13.4",
"typescript": "4.4.4",
"@reown/appkit": "^1.6.3",
"@reown/appkit-core": "^1.6.3",
"@reown/appkit-adapter-solana": "^1.6.3",
"@reown/appkit-adapter-wagmi": "^1.6.3",
"@tanstack/react-query": "^5.24.1"

Node.js Version

22

Package Manager

pnpm

@val-o val-o added bug Something isn't working needs review labels Jan 3, 2025
Copy link

linear bot commented Jan 3, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants
@rtomas @val-o and others