diff --git a/web/src/contexts/PezkuwiContext.tsx b/web/src/contexts/PezkuwiContext.tsx index 91d9a2af..99cf4f6f 100644 --- a/web/src/contexts/PezkuwiContext.tsx +++ b/web/src/contexts/PezkuwiContext.tsx @@ -574,7 +574,6 @@ export const PezkuwiProvider: React.FC = ({ window.addEventListener('walletconnect_disconnected', handleWcDisconnect); return () => window.removeEventListener('walletconnect_disconnected', handleWcDisconnect); - // eslint-disable-next-line react-hooks/exhaustive-deps }, [walletSource]); const value: PezkuwiContextType = { diff --git a/web/src/lib/walletconnect-service.ts b/web/src/lib/walletconnect-service.ts index d1b12874..a7109cea 100644 --- a/web/src/lib/walletconnect-service.ts +++ b/web/src/lib/walletconnect-service.ts @@ -30,28 +30,6 @@ let initPromise: Promise | null = null; let currentSession: SessionTypes.Struct | null = null; let requestId = 0; -/** - * Get a chainId that is approved in the current WC session. - * The wallet determines actual signing chain from the payload's genesisHash, - * so the WC request chainId is only for WC protocol compliance. - */ -function getApprovedChainId(fallback: string): string { - if (!currentSession) return fallback; - const ns = currentSession.namespaces['polkadot']; - if (!ns) return fallback; - - // Try chains array first - if (ns.chains && ns.chains.length > 0) return ns.chains[0]; - - // Derive from accounts (format: polkadot::
) - if (ns.accounts && ns.accounts.length > 0) { - const parts = ns.accounts[0].split(':'); - if (parts.length >= 2) return `${parts[0]}:${parts[1]}`; - } - - return fallback; -} - /** * Initialize the WalletConnect SignClient (singleton with race protection) */