diff --git a/public/assets/wallet.js b/public/assets/wallet.js index f9dddd8..af34c8c 100644 --- a/public/assets/wallet.js +++ b/public/assets/wallet.js @@ -76,8 +76,11 @@ window.IAPWallet = (function () { const EP = await loadWcSdk(); const chainId = Number(c.chainId); if (!wcProvider) { + // optionalChains (not required): testnet wallets like Trust hang or reject + // a session that REQUIRES a chain they don't natively list (Amoy 80002). + // Optional lets the session establish; we switch/add the chain after. wcProvider = await EP.init({ - projectId, chains: [chainId], optionalChains: [chainId], showQrModal: true, + projectId, optionalChains: [chainId], showQrModal: true, rpcMap: { [chainId]: c.rpc }, metadata: { name: c.siteName || 'InstantAdPay', description: c.tagline || 'Advertise and earn, paid on-chain.', url: location.origin, icons: [location.origin + '/logo-icon.png'] } diff --git a/public/index.html b/public/index.html index e866d20..1cc7dae 100644 --- a/public/index.html +++ b/public/index.html @@ -439,7 +439,7 @@ - + diff --git a/public/my.html b/public/my.html index 28196a2..80e4d04 100644 --- a/public/my.html +++ b/public/my.html @@ -690,7 +690,7 @@ - +