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 @@ - + - +