Admin: a linked wallet can no longer be misread as an active position
The member card showed the wallet address on its own, directly above "Registered:
no (payouts off)". That reads as "he is set up" when he is not, and it caused a
real misread today on @mcbit1: wallet linked, memberId 0 on chain, every sale in
his line walking up to his sponsor while the row looked healthy.
Linking a wallet is a free signature that tells the site which address is theirs.
Switching on payouts is a separate transaction that creates the position. Only the
second one makes them payable, so the two states now say so:
Main wallet 0x30a7…5703 payouts OFF
Registered no wallet linked, but payouts were never switched on, so no
position exists. Sales in their line walk up to their sponsor and
lock there.
and the no-wallet case says "no wallet linked yet" instead of the same text.
qa/run.sh member: 0 bugs (the 2 warnings are pre-existing and unrelated).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -488,6 +488,6 @@
|
||||
</div>
|
||||
|
||||
<script src="/assets/common.js?v=20260916a"></script>
|
||||
<script src="/assets/admin.js?v=20260916c"></script>
|
||||
<script src="/assets/admin.js?v=20260917a"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+16
-2
@@ -347,7 +347,15 @@
|
||||
let h = '<div class="grid c2">';
|
||||
h += '<div><h4 style="margin:0 0 6px">Identity</h4>' + kv([
|
||||
['Email', esc(a.email)], ['Username', a.username ? '@' + esc(a.username) : '<span class="muted">not set</span>'], ['Share code', esc(a.code || '')],
|
||||
['Main wallet', a.address ? '<span class="mono small">' + esc(a.address) + '</span>' : '<span class="muted">none linked</span>'],
|
||||
// A linked wallet is NOT an active position: linking is a free signature, switching on
|
||||
// payouts is a separate transaction that creates the position. The address used to sit here
|
||||
// on its own, which reads as "he is set up" when he is not (Marty, 2026-09-17, @mcbit1).
|
||||
['Main wallet', a.address
|
||||
? '<span class="mono small">' + esc(a.address) + '</span>'
|
||||
+ (ch && !ch.readError
|
||||
? ' <span class="small" style="color:var(--mint)">payouts ON</span>'
|
||||
: ' <span class="small" style="color:var(--bad)">payouts OFF</span>')
|
||||
: '<span class="muted">none linked</span>'],
|
||||
['Extra positions', d.positions.length ? d.positions.map(p => '<span class="mono small">' + esc(p.address.slice(0, 8) + '…' + p.address.slice(-6)) + '</span>' + (p.memberId ? ' = #' + p.memberId : ' (unregistered)')).join('<br>') : '<span class="muted">none</span>'],
|
||||
['Sponsor (site)', d.upline.length ? memLink(d.upline[0].email, d.upline[0].name) + ' <span class="muted small">token ' + esc(a.sponsorRef || '') + '</span>' : (a.sponsorRef ? '<span class="muted">unresolved: ' + esc(a.sponsorRef) + '</span>' : '<span class="muted">none (company)</span>')],
|
||||
['Upline chain', d.upline.length > 1 ? d.upline.map(u => memLink(u.email, u.name)).join(' → ') : '<span class="muted">-</span>'],
|
||||
@@ -355,7 +363,13 @@
|
||||
['Line banner', a.lineTargetUrl ? '<a href="' + esc(a.lineTargetUrl) + '" target="_blank" rel="noopener">' + esc(a.lineTargetUrl.slice(0, 50)) + '</a>' : '<span class="muted">not set</span>'],
|
||||
['Chat', a.chatAvailable ? 'available' : 'switched off']]) + '</div>';
|
||||
h += '<div><h4 style="margin:0 0 6px">On-chain and money</h4>' + kv([
|
||||
['Registered', ch ? (ch.readError ? 'read error' : 'yes, #' + ch.memberId + ' under ' + (ch.sponsorId ? '#' + ch.sponsorId + (d.names[ch.sponsorId] ? ' @' + esc(d.names[ch.sponsorId]) : '') : 'nobody')) : '<span class="muted">no (payouts off)</span>'],
|
||||
// Say WHICH of the two "not registered" states this is, and what it costs them, so the row
|
||||
// above never gets read as "he is fine".
|
||||
['Registered', ch
|
||||
? (ch.readError ? 'read error' : 'yes, #' + ch.memberId + ' under ' + (ch.sponsorId ? '#' + ch.sponsorId + (d.names[ch.sponsorId] ? ' @' + esc(d.names[ch.sponsorId]) : '') : 'nobody'))
|
||||
: (a.address
|
||||
? '<span style="color:var(--bad)">no</span> <span class="muted small">wallet linked, but payouts were never switched on, so no position exists. Sales in their line walk up to their sponsor and lock there.</span>'
|
||||
: '<span style="color:var(--bad)">no</span> <span class="muted small">no wallet linked yet.</span>')],
|
||||
['Qualifying buyers', ch && !ch.readError ? ch.buyerCount + ' · ' + level : '-'],
|
||||
['Packages bought', t.purchases + (t.purchases ? ' · $' + (t.spentCents / 100).toFixed(0) + ' · ' + polOf(t.spentWei) + ' POL' : '')],
|
||||
['Payouts received', t.payoutsIn + (t.payoutsIn ? ' · ' + polOf(t.receivedWei) + ' POL' : '')],
|
||||
|
||||
Reference in New Issue
Block a user