raydium-io / raydium-ui-v3

Open-source user interface for Raydium programs
https://raydium-ui-v3-kappa.vercel.app
Apache License 2.0
19 stars 26 forks source link

WalletConnect: Solana chain id #7

Closed mahnunchik closed 3 months ago

mahnunchik commented 3 months ago

I don't know where to ask the question, so I'll ask here

I'm developing crypto wallet and implementing a WaletConnect connection for Solana.

According to the documentation Solana chain id should be solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp but https://raydium.io/swap/ returns proposal with solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ for mainnet.

Could you tell me who is wrong?

mahnunchik commented 3 months ago

https://github.com/orgs/WalletConnect/discussions/4627

cruzshia commented 3 months ago

we don't set up any chain id but for sure you need to apply for a wallet connect project id https://github.com/raydium-io/raydium-ui-v3/blob/master/src/provider/WalletProvider.tsx#L42. for more details, I think you should ask wallet connect teams.

mahnunchik commented 3 months ago

@cruzshia the line of code you provided does the exact opposite: sets the chain id for WalletConnect

https://github.com/raydium-io/raydium-ui-v3/blob/d2bd74317854626bb3c5c5a1f120ef4a7fc7d17b/src/provider/WalletProvider.tsx#L43

@solana/wallet-adapter-base:

https://github.com/anza-xyz/wallet-adapter/blob/8748ff507b61eaf65e06439fe4bc5fb27e48f70c/packages/wallets/walletconnect/src/adapter.ts#L88

@jnwng/walletconnect-solana https://github.com/WalletConnect/walletconnect-solana/blob/main/packages/walletconnect-solana/src/adapter.ts#L14-L16