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:
@@ -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); };
|
||||
})();
|
||||
|
||||
+2
-2
@@ -32,10 +32,10 @@
|
||||
<button class="btn sec small" id="buyForBtn">Buy it for them</button></details>
|
||||
</div>
|
||||
<div id="status" class="note" hidden></div>
|
||||
<div class="card" id="doneCard" hidden><h3>Your spot is in the line</h3><p>Next: add your image and link in <a href="/my">My Spots</a>.</p><p class="small mono" id="txLink"></p></div>
|
||||
<div class="card" id="doneCard" hidden><h3>Your spot is in the line</h3><p>Next: add your image and link in My Spots. One free signature signs you in (it cannot move funds).</p><div class="row"><button class="btn" id="toMyBtn">Open My Spots</button></div><p class="small mono" id="txLink"></p></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=1"></script>
|
||||
<script src="/assets/wallet.js?v=1"></script>
|
||||
<script src="/assets/join.js?v=1"></script>
|
||||
<script src="/assets/join.js?v=2&o=1"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user