pera-wallet
pera-wallet copied to clipboard
WalletConnect identifying the selected network for the connected account
When connecting from a dApp to Pera wallet through WalletConnect the chainId
property is always set to 4610
regardless of whether Pera was in mainnet or testnet mode.
The result is that on the dApp side, after establishing a connection, there doesn't seem to be a way for to infer the appropriate network for the connected account.
I would expect that chainId
to be set to the genesis hash of the network, but I noticed that in WalletConnect specification the chainId
is of type number
which doesn't accommodate the genesis hash directly.
Any thoughts on this issue?
Update: I've found that in the new WalletConnect spec chainId
will change to type string
: https://github.com/WalletConnect/walletconnect-specs/blob/main/sign/rpc-methods.md#wc_sessionrequest