Buyer names: an admin wallet alias (POST /api/admin/wallet-alias {wallet, username}, a MySQL document) for members who bought from a second wallet (bizventures, spot #3, Marty 2026-11-14); the sale toast shows a short wallet instead of 'A member' when no name is known; common.js?v=20261114a. Smoke 76/76

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-14 07:38:06 -06:00
parent 2c0e0dcedc
commit 7c2aab8f65
9 changed files with 19 additions and 9 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ window.BL = (function () {
const box = document.createElement('div'); box.className = 'bl-toasts'; box.setAttribute('aria-live', 'polite'); document.body.appendChild(box);
const show = it => {
const top = it.pays.filter(p => !p.failed).sort((a, b) => (BigInt(b.wei) > BigInt(a.wei) ? 1 : -1))[0];
const name = it.ownerName ? '@' + esc(it.ownerName) : 'A member';
const name = it.ownerName ? '@' + esc(it.ownerName) : esc(String(it.owner || '').slice(0, 6) + '...' + String(it.owner || '').slice(-4)); // never a blank buyer (Marty 2026-11-14)
const el = document.createElement('a'); el.className = 'bl-toast'; el.href = '/ledger';
el.innerHTML = '<b>' + name + '</b> took spot #' + it.spotId
+ (top ? '<br><span>' + (it.pays.length > 1 ? it.pays.length + ' members paid, ' : '') + (top.name ? '@' + esc(top.name) : 'a member') + ' got ' + fmtPol(top.wei, 2) + ' POL</span>' : '<br><span>paid on-chain, $5</span>');