Never hold a sale for an unactivated sponsor: walk up to the first payable upline, referral follows the money
Marty, 2026-09-16: a purchase must never wait on a sponsor who has not linked a wallet / switched on payouts. /api/sponsor and /me now walk the site's sponsor line upward to the first upline that is activated with payouts on (not on the no-payout list) and the buy proceeds under them; nobody activated -> the catch position (#1). The buyer sees a one-line notice and carries on; admin gets a heads-up. When the position is created on-chain (MemberActivated), sponsorSyncOnEvent re-points the buyer's stored sponsor to whoever was paid (#1 included), so the referral leaves the skipped sponsor's line for good, then sends the pointed notices: the skipped sponsor(s) are told they lost this referral permanently and how to switch on payouts; the sponsor who was paid is told the referral is theirs for good and to coach the one who missed it (teach-forward). Admin lookup: GET /api/admin/sponsor-resolve?ref=. Only a transient chain error still pauses a buy. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -2069,6 +2069,7 @@
|
||||
}
|
||||
const spNow = fromPos ? { sponsorId: meNow.memberId } : await jretry('/api/sponsor');
|
||||
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
|
||||
// transaction that spends most of the balance ("drain your wallet"), so Trust users
|
||||
// get a heads-up first; other wallets go straight to the confirmation.
|
||||
|
||||
+1
-1
@@ -1022,7 +1022,7 @@
|
||||
<script src="/assets/common.js?v=20260916a"></script>
|
||||
<script src="/assets/wallet.js?v=20260911a"></script>
|
||||
<script src="/assets/promo.js?v=20260911a"></script>
|
||||
<script src="/assets/my.js?v=20260916c"></script>
|
||||
<script src="/assets/my.js?v=20260916d"></script>
|
||||
<script src="/assets/chat.js?v=20260907l"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user