fix(react-wallet-v2): ensure clientId is logged and stored

This commit is contained in:
Ben Kremer 2023-06-16 13:22:59 +02:00
parent 9b09576081
commit a7ab09b606

View File

@ -13,6 +13,14 @@ export async function createSignClient(relayerRegionURL: string) {
icons: ['https://avatars.githubusercontent.com/u/37784886']
}
})
try {
const clientId = await signClient.core.crypto.getClientId()
console.log('WalletConnect ClientID: ', clientId)
localStorage.setItem('WALLETCONNECT_CLIENT_ID', clientId)
} catch (error) {
console.error('Failed to set WalletConnect clientId in localStorage: ', error)
}
}
export async function updateSignClientChainId(chainId: string, address: string) {