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] unable to set custom token for solana #3571

Open
ThatOneCalculator opened this issue Jan 6, 2025 · 4 comments
Open

[bug] unable to set custom token for solana #3571

ThatOneCalculator opened this issue Jan 6, 2025 · 4 comments
Labels
bug Something isn't working feature-request

Comments

@ThatOneCalculator
Copy link

ThatOneCalculator commented Jan 6, 2025

Link to minimal reproducible example

Code attached, fw'd from Discord as per request

Summary

I'm currently trying to show a custom token, however, the documentation only covers EIP-style tokens.

The Tokens type seems to take

// ...
 [x: `solana:${string}`]: Token;
 [x: `solana:${number}`]: Token;
// ...

but I don't know what that value should be.

It seems like it should be

createAppKit({
  adapters: [solanaWeb3JsAdapter],
  [solana],
  projectId,
  metadata: {
    // ...
  },
  debug: true,
  tokens: {
    "solana:mainnet-beta": {
      address: TOKEN_ADDRESS,
    }
  },
})

but that still shows SOL when using the <appkit-button /> WebComponent.

image

FWIW, I'm able to get the balance of that token manually using @solana/web3.js. It's just the WebComponent that's not displaying it.

List of related npm package versions

"@reown/appkit": "^1.5.0",
"@reown/appkit-adapter-solana": "^1.5.0",
"@solana/wallet-adapter-wallets": "^0.19.32",
"vue": "^3.5.13",

Node.js Version

Bun 1.1.42

Package Manager

Bun 1.1.42

@ThatOneCalculator ThatOneCalculator added bug Something isn't working needs review labels Jan 6, 2025
Copy link

linear bot commented Jan 6, 2025

@linear linear bot removed the needs review label Jan 6, 2025
@linear linear bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 6, 2025
@linear linear bot reopened this Jan 6, 2025
@rtomas
Copy link
Contributor

rtomas commented Jan 6, 2025

Thanks for reporting the issue. Hope to solve it soon.

@ThatOneCalculator
Copy link
Author

Any reason why this was labeled as a feature request? As per the documentation & types, this is already existing functionality, no?

@amrit92
Copy link

amrit92 commented Jan 9, 2025

I'm seeing this error with EIP as well

 "eip155:80002": {
      address: "USDC-address-for-polygon-amoy",
    },

But webcomponent shows POL

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

No branches or pull requests

4 participants