Sponsor pre-check alert: only the checkout call may alert (the dashboard's display-only call never does), and the alert says what it is: a heads-up before the sale, nothing paid yet
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -14,7 +14,7 @@
|
||||
// if they arrived through a sponsor's link, show who they're joining under
|
||||
(async () => {
|
||||
try {
|
||||
const sp = await (await fetch('/api/sponsor')).json();
|
||||
const sp = await (await fetch('/api/sponsor?intent=view')).json(); // display only: never an alert
|
||||
if (sp && sp.invited && sp.name && $('sponsorNote')) { $('sponsorNoteName').textContent = sp.name; $('sponsorNote').hidden = false; }
|
||||
} catch (e) {}
|
||||
})();
|
||||
@@ -2217,7 +2217,7 @@
|
||||
}
|
||||
if (cur !== wantAddr) throw new Error('Your wallet connected as ' + cur.slice(0, 6) + '…' + cur.slice(-4) + ' but you chose ' + wantAddr.slice(0, 6) + '…' + wantAddr.slice(-4) + '. Switch accounts in your wallet app and try again.');
|
||||
}
|
||||
const spNow = fromPos ? { sponsorId: meNow.memberId } : await jretry('/api/sponsor');
|
||||
const spNow = fromPos ? { sponsorId: meNow.memberId } : await jretry('/api/sponsor?intent=buy');
|
||||
if (!fromPos && !meNow.memberId && spNow.sponsorBlocked) { IAP.status(sponsorHoldText(spNow), 'bad'); return; } // first activation must not hand a sponsored member to the company
|
||||
if (!fromPos && !meNow.memberId && spNow.sponsorRouted) IAP.status((spNow.sponsorRouted.from || 'Your sponsor') + ' has not switched on payouts, so this purchase credits ' + spNow.sponsorRouted.to + ' instead. You are not held up; carrying on.', 'ok');
|
||||
// pre-flight: stop early if the POL is not there. Trust Wallet also hard-blocks any
|
||||
|
||||
+1
-1
@@ -1070,7 +1070,7 @@
|
||||
<script src="/assets/common.js?v=20260916a"></script>
|
||||
<script src="/assets/wallet.js?v=20260911a"></script>
|
||||
<script src="/assets/promo.js?v=20260921d"></script>
|
||||
<script src="/assets/my.js?v=20260924c"></script>
|
||||
<script src="/assets/my.js?v=20260924d"></script>
|
||||
<script src="/assets/chat.js?v=20260907l"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user