Signed /api/iap/unpaid feed for InstantAdPay's wallet-link nudges; balance screen and a one-time toast tell a player with POL waiting and no wallet how to get paid
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -59,6 +59,7 @@ function lobby() {
|
||||
$('lChap').textContent = P.chapter; $('lDrips').textContent = P.bank.toLocaleString(); $('lPol').textContent = f3(BAL.unpaid);
|
||||
$('lPool').innerHTML = 'POL pool <b>' + f3(POOL.available) + '</b> · today’s cap left <b>' + f3(POOL.capLeft) + '</b> · a chapter drip is <b>' + f3(POOL.dripPol) + '</b>';
|
||||
$('lIap').href = IAP + '/my'; $('bLevel').href = IAP + '/my#buy'; tip('lTip');
|
||||
try { if (BAL && BAL.unpaid > 0 && ME && !ME.wallet && !ME.guest && !sessionStorage.getItem('dr.walletnudge')) { sessionStorage.setItem('dr.walletnudge', '1'); toast(f3(BAL.unpaid) + ' POL is waiting. Link a wallet on InstantAdPay to get paid.'); } } catch (e) {}
|
||||
$('lPerk').hidden = !ME_EXTRA.perk; $('lPerk').textContent = ME_EXTRA.perk || ''; // member perk (2026-10-05)
|
||||
$('bHangar').textContent = P.freeUpgrades > 0 ? 'Hangar · ' + P.freeUpgrades + ' free' : 'Hangar';
|
||||
// signed in through the game: these open InstantAdPay already signed in (in-game sign-in pass, 2026-10-03)
|
||||
@@ -236,6 +237,7 @@ function balance() {
|
||||
show('ovBal'); api('/api/balance').then(function (b) { BAL = b;
|
||||
$('bPol').textContent = f3(b.unpaid); var pct = Math.min(100, b.unpaid / b.threshold * 100); $('bProg').style.width = pct + '%';
|
||||
$('bNote').textContent = 'Pays to your wallet at ' + b.threshold + ' POL. ' + pct.toFixed(0) + '% of the way. Paid so far: ' + f3(b.paidTotal) + ' POL.';
|
||||
if (b.unpaid > 0 && !(ME && ME.wallet)) { $('bWallet').innerHTML = '<b style="color:#f2b544">' + f3(b.unpaid) + ' POL is waiting.</b> No wallet is linked to your InstantAdPay account yet, so it cannot be paid out. <a href="' + IAP + '/my#wallet" target="_blank" rel="noopener" style="color:#f2b544">Link a wallet</a> (one free signature) and it pays out on the next sweep.'; }
|
||||
var h = ''; if (!b.history.length) h = '<div class="led"><span>No drips yet. Clear a chapter.</span><span class="m">0.000</span></div>';
|
||||
b.history.forEach(function (l) { var cls = l.kind === 'payout' ? (l.status === 'paid' ? 'm ok' : l.status === 'failed' ? 'm neg' : 'm') : (l.pol < 0 ? 'm neg' : 'm'); h += '<div class="led"><span>' + esc(l.label) + (l.tx ? ' · <a href="https://polygonscan.com/tx/' + esc(l.tx) + '" target="_blank" rel="noopener">tx</a>' : '') + '</span><span class="' + cls + '">' + (l.kind === 'payout' ? '' : (l.pol < 0 ? '' : '+')) + f3(l.pol) + '</span></div>'; });
|
||||
$('ledger').innerHTML = h;
|
||||
|
||||
Reference in New Issue
Block a user