From 63199e767a95bbc8353b317d9632d8a9738c117c Mon Sep 17 00:00:00 2001 From: martbost Date: Fri, 13 Nov 2026 07:00:23 -0600 Subject: [PATCH] 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 --- public/assets/join.js | 5 +++++ public/join.html | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/public/assets/join.js b/public/assets/join.js index 7d14605..a0a12d7 100644 --- a/public/assets/join.js +++ b/public/assets/join.js @@ -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); }; })(); diff --git a/public/join.html b/public/join.html index 0132ca9..0b2e37b 100644 --- a/public/join.html +++ b/public/join.html @@ -32,10 +32,10 @@ - + - +