Add "Disconnect wallet" button (clears stuck WC session / switch wallets)

A stuck WalletConnect request or wrong-wallet choice could trap testers. New
IAPWallet.disconnect() drops the WC session, forgets the chosen provider, and
clears WC localStorage so the next connect re-offers the picker. Surfaced as a
"Disconnect wallet" button on the Wallet pane.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-08 09:21:42 -05:00
parent d23eb10c58
commit 379a5352ea
4 changed files with 22 additions and 4 deletions
+8 -2
View File
@@ -645,6 +645,12 @@
<p><button class="btn" id="faucetBtn" type="button">Get free test POL</button>
<span class="small muted" id="faucetInfo"></span></p>
</div>
<div class="card">
<h3>Wallet connection</h3>
<p class="muted small">Connected the wrong wallet, or stuck on a transaction prompt? Disconnect to clear the session, then reconnect or pick a different wallet.</p>
<p><button class="btn sec small" id="wcDisconnect" type="button">Disconnect wallet</button>
<span class="small muted" id="wcDisconnectInfo"></span></p>
</div>
<div class="grid c2">
<div class="card"><h3>Your account</h3>
<p id="posLine" class="muted small">…</p></div>
@@ -690,8 +696,8 @@
</div>
</div>
<script src="/assets/common.js?v=20260908c"></script>
<script src="/assets/wallet.js?v=20260908f"></script>
<script src="/assets/my.js?v=20260908i"></script>
<script src="/assets/wallet.js?v=20260908g"></script>
<script src="/assets/my.js?v=20260908j"></script>
<script src="/assets/chat.js?v=20260907l"></script>
</body>
</html>