After a buy, Open My Spots signs in with the already-connected wallet and goes straight there (Marty 2026-11-13)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-13 07:00:23 -06:00
parent fddd08fbad
commit 63199e767a
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -34,6 +34,11 @@
if (forAddr) $('doneCard').querySelector('h3').textContent = 'The spot is in the line for ' + BL.short(forAddr);
} catch (e) { BL.status(String(e && e.message || e).slice(0, 300), 'err'); }
}
// right after a buy the wallet is already connected: sign in and go straight to My Spots (Marty 2026-11-13: it asked him to sign in again)
$('toMyBtn').onclick = async () => {
try { const me = await BL.getJSON('/api/me'); if (!me.signedIn) { BL.status('Check your wallet for the sign-in message.'); await BLWallet.signIn(); } location.href = '/my'; }
catch (e) { BL.status(String(e && e.message || e).slice(0, 300), 'err'); }
};
$('buyBtn').onclick = () => doBuy(null);
$('buyForBtn').onclick = () => { const a = $('forAddr').value.trim(); if (!/^0x[0-9a-fA-F]{40}$/.test(a)) return BL.status('Enter a full wallet address (0x followed by 40 characters).', 'err'); doBuy(a); };
})();