diff --git a/ads.js b/ads.js index 8179d27..a739ade 100644 Binary files a/ads.js and b/ads.js differ diff --git a/public/assets/my.js b/public/assets/my.js index ae9c2d4..a3cee50 100644 --- a/public/assets/my.js +++ b/public/assets/my.js @@ -667,7 +667,8 @@ if (!window.__lbChecked) { // daily login bonus, once per session (server guards once/day) window.__lbChecked = true; api('/api/my/login-bonus').then(r => { - if (r && r.granted > 0) { + if (r && r.comeback > 0) { IAP.status('๐ŸŽ‰ Welcome back! +' + r.comeback + ' bonus credits for coming back, plus +' + r.granted + ' for signing in today.', 'ok'); playSound('chaching'); setTimeout(loadDashboard, 900); } + else if (r && r.granted > 0) { IAP.status('๐ŸŽ Daily login bonus: +' + r.granted + ' credits' + (r.streak > 1 ? ' ยท ' + r.streak + '-day streak' : '') + '!', 'ok'); playSound('chaching'); setTimeout(loadDashboard, 900); } diff --git a/public/my.html b/public/my.html index 43a3b88..ca41fc6 100644 --- a/public/my.html +++ b/public/my.html @@ -1131,7 +1131,7 @@ - + diff --git a/server.js b/server.js index 7404d06..a2c11c6 100644 --- a/server.js +++ b/server.js @@ -3456,7 +3456,8 @@ const server = http.createServer(async (req, res) => { if (p === '/api/my/login-bonus' && req.method === 'POST') { const s = await auth.fromRequest(req); if (!s || !s.email) return json(res, 401, { error: 'Sign in first.' }); - return json(res, 200, await ads.grantLoginBonus(s.email)); + const cfg = siteConfig(); // comebackBonus (250) after comebackDays (7) away; 0 switches it off + return json(res, 200, await ads.grantLoginBonus(s.email, { comeback: cfg.comebackBonus == null ? 250 : Number(cfg.comebackBonus), comebackDays: cfg.comebackDays == null ? 7 : Number(cfg.comebackDays) })); } // -- rehearsal test-POL faucet: top a connected wallet up to 10 test-POL // (anvil_setBalance, no key needed). Rehearsal-only, rate-limited.