diff --git a/packages/ui/src/components/modals/WalletConnectSessionProposal.tsx b/packages/ui/src/components/modals/WalletConnectSessionProposal.tsx index 4ea8614f..4b05784f 100644 --- a/packages/ui/src/components/modals/WalletConnectSessionProposal.tsx +++ b/packages/ui/src/components/modals/WalletConnectSessionProposal.tsx @@ -48,6 +48,9 @@ const WalletConnectSessionProposal = ({ onClose, className, sessionProposal }: P [sessionProposal?.params] ) + console.log('currentNamespace', currentNamespace) + console.log('chains.includes(currentNamespace)', chains.includes(currentNamespace)) + console.log('chains', chains) useEffect(() => { if (!web3wallet || !sessionProposal) return @@ -57,6 +60,8 @@ const WalletConnectSessionProposal = ({ onClose, className, sessionProposal }: P - Requested: ${chains} - Current: ${currentNamespace}` ) + } else { + setErrorMessage('') } }, [chains, currentNamespace, sessionProposal, web3wallet]) diff --git a/packages/ui/src/hooks/useWalletConnectNamespace.tsx b/packages/ui/src/hooks/useWalletConnectNamespace.tsx index dc02166e..201ff029 100644 --- a/packages/ui/src/hooks/useWalletConnectNamespace.tsx +++ b/packages/ui/src/hooks/useWalletConnectNamespace.tsx @@ -10,7 +10,10 @@ export const useGetWalletConnectNamespace = () => { client .getChainSpecData() - .then((data) => setGenesisHash(data.genesisHash)) + .then((data) => { + console.log('---> data', data.genesisHash) + setGenesisHash(data.genesisHash) + }) .catch(console.error) }, [client]) @@ -18,6 +21,7 @@ export const useGetWalletConnectNamespace = () => { const namespace = useMemo(() => `polkadot:${genesisTruncated}`, [genesisTruncated]) + console.log('namespace', namespace) const getAccountsWithNamespace = useCallback( (accounts: string[]) => { return accounts.map((address) => `${namespace}:${address}`)