Network Weekend (Marty 2026-11-17): +3 board days per Boost bought Fri 11-27 00:00 CT to Tue 12-01 00:00 CT, ribbon, chatbot facts
weekend.js (WEEKEND_BOOST_DAYS=0 off, WEEKEND_NOW test clock); wire.js stacks SKU days + the bonus by the purchase's chain time, so it needs no contract change (the SKU holds 7 board days; a Boost is days, not views). /api/config, quote, order show the weekend days. netdeals.js + /assets/netweekend.js ribbon via common.js (not admin, never framed), common.js?v=3. Chatbot FACTS line and chatcore finish hook while live. qa/weekend.test.cjs; e2e 63/63. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -31,6 +31,8 @@ const hubevents = require('./hubevents');
|
||||
const hubline = require('./hubline');
|
||||
const proof = require('./proof');
|
||||
const netsites = require('./netsites');
|
||||
const netdeals = require('./netdeals'); // Network Weekend ribbon feed (2026-11-17)
|
||||
const weekend = require('./weekend'); // Network Weekend +3 board days per Boost (2026-11-17)
|
||||
const lstrack = require('./lstrack');
|
||||
const chatbot = require('./chatbot');
|
||||
const adwriter = require('./adwriter');
|
||||
@@ -273,7 +275,7 @@ const server = http.createServer(async (req, res) => {
|
||||
if (p === '/api/config' && req.method === 'GET') {
|
||||
const live = await shop.liveRules().catch(() => null);
|
||||
return json(res, 200, { site: C.site, siteName: C.siteName, staging: C.staging, chainId: C.chainId, chainName: C.chainName, rpc: C.publicRpc, walletConnectProjectId: C.walletConnectProjectId,
|
||||
boost: C.boost, split: live ? { resharerBps: live.resharerBps, potBps: live.potBps, levelBps: live.levelBps, maxDepth: 20, live: true } : Object.assign({ proposal: true }, C.split),
|
||||
boost: Object.assign({}, C.boost, { days: C.boost.days + weekend.bonusDays(), weekendDays: weekend.bonusDays() }), split: live ? { resharerBps: live.resharerBps, potBps: live.potBps, levelBps: live.levelBps, maxDepth: 20, live: true } : Object.assign({ proposal: true }, C.split),
|
||||
reward: { cents: C.reward.cents, dailyCap: C.reward.dailyCap, payouts: C.reward.payouts, tiers: C.reward.tiers, proposal: true }, credits: C.credits, visitSeconds: C.visitSeconds, ad: C.ad,
|
||||
sso: networksso.enabled() || networksso.hubOn(), shop: { live: shop.watching() && shop.signerOn(), contract: shop.watching() ? C.contractAddress : null }, explorer: C.explorer, joinUrl: joinUrl(''),
|
||||
aiWriter: adwriter.enabled() ? { daily: adwriter.dailyCap() } : null });
|
||||
@@ -316,6 +318,7 @@ const server = http.createServer(async (req, res) => {
|
||||
if (p === '/api/ledger' && req.method === 'GET') return json(res, 200, proof.ledger(u.searchParams.get('n')), { 'Cache-Control': 'public, max-age=10' });
|
||||
if (p === '/api/contract' && req.method === 'GET') { if (limited(req, 'contract', 600, 3600000)) return json(res, 429, { error: 'Too many requests' }); return json(res, 200, await proof.contract(), { 'Cache-Control': 'public, max-age=60' }); }
|
||||
if (p === '/api/network-sites' && req.method === 'GET') return netsites.handle(req, res);
|
||||
if (p === '/api/network-deals' && req.method === 'GET') return netdeals.handle(req, res, 'viraladsource'); // Network Weekend ribbon
|
||||
if (p === '/api/recent' && req.method === 'GET') {
|
||||
const cut = Date.now() - 30 * 60000;
|
||||
const ads = store.liveAds().filter(a => a.createdAt > cut).slice(-6).map(a => ({ kind: 'ad', key: 'a' + a.id, at: a.createdAt, name: uname(a.owner), headline: a.headline }));
|
||||
@@ -328,7 +331,7 @@ const server = http.createServer(async (req, res) => {
|
||||
if (limited(req, 'quote', 600, 3600000)) return json(res, 429, { error: 'Too many requests this hour.' });
|
||||
const qty = Number(u.searchParams.get('qty') || 1);
|
||||
if (!Number.isInteger(qty) || qty < 1 || qty > C.boost.maxQty) return json(res, 400, { error: 'Pick 1 to ' + C.boost.maxQty + ' Boosts.' });
|
||||
try { return json(res, 200, Object.assign({ usd: C.boost.usd * qty, days: C.boost.days * qty }, await shop.quote(C.boost.sku, qty))); } catch (e) { return json(res, 503, { error: 'Price unavailable right now. Try again in a minute.' }); }
|
||||
try { return json(res, 200, Object.assign({ usd: C.boost.usd * qty, days: (C.boost.days + weekend.bonusDays()) * qty }, await shop.quote(C.boost.sku, qty))); } catch (e) { return json(res, 503, { error: 'Price unavailable right now. Try again in a minute.' }); }
|
||||
}
|
||||
if (p === '/api/gas' && req.method === 'GET') { try { return json(res, 200, shop.watching() ? await shop.fees() : {}); } catch (e) { return json(res, 200, {}); } }
|
||||
if (/^\/api\/tx\/0x[0-9a-fA-F]{64}$/.test(p) && req.method === 'GET') {
|
||||
@@ -417,7 +420,7 @@ const server = http.createServer(async (req, res) => {
|
||||
source: root ? { code: root.id, url: shareUrl(root) } : null, tree: a ? tree.tree(a.id) : null, linkspin: ls, reshares: mine,
|
||||
credits: { earned: cr.earned, spent: cr.spent, balance: store.creditBalance(me), views: cr.views, nextAt: C.credits.views - (cr.views % C.credits.views), per: C.credits.per, every: C.credits.views },
|
||||
rewards: signup.mine(me), boosts: wire.purchases().filter(b => b.buyer === me).sort((x, y) => (y.at || 0) - (x.at || 0)).map(wire.boostView), earned: myEarned(me),
|
||||
joinUrl: joinUrl(''), boost: C.boost });
|
||||
joinUrl: joinUrl(''), boost: Object.assign({}, C.boost, { days: C.boost.days + weekend.bonusDays(), weekendDays: weekend.bonusDays() }) });
|
||||
}
|
||||
if (p === '/api/my/spins' && req.method === 'GET') {
|
||||
if (limited(req, 'spins', 120, 3600000)) return json(res, 429, { error: 'Too many requests this hour.' });
|
||||
@@ -473,7 +476,7 @@ const server = http.createServer(async (req, res) => {
|
||||
const via = viaOf(req); const vs = via ? store.share(via.code) : null;
|
||||
const resharer = vs && vs.step > 0 && vs.owner !== me ? vs.owner : null;
|
||||
{ const S0 = store.state(); S0.orderVia = S0.orderVia || {}; if (resharer) S0.orderVia[me] = { code: vs.id, at: Date.now() }; else delete S0.orderVia[me]; store.save(); } // which branch sold it (proof.js books it on that reshare link)
|
||||
try { return json(res, 200, Object.assign({ buyer: me, usd: C.boost.usd * qty, days: C.boost.days * qty, qty, adId: a.id, resharerName: resharer ? uname(resharer) : null }, await shop.order(me, C.boost.sku, qty, a.id, line, resharer))); }
|
||||
try { return json(res, 200, Object.assign({ buyer: me, usd: C.boost.usd * qty, days: (C.boost.days + weekend.bonusDays()) * qty, qty, adId: a.id, resharerName: resharer ? uname(resharer) : null }, await shop.order(me, C.boost.sku, qty, a.id, line, resharer))); }
|
||||
catch (e) { console.error('order failed:', String(e && e.message || e).slice(0, 200)); return json(res, 503, { error: 'Price unavailable right now. Try again in a minute.' }); }
|
||||
}
|
||||
if (p === '/api/my/paid' && req.method === 'POST') { shop.nudge(); return json(res, 200, { ok: true, confirmations: C.shopConfirmations }); }
|
||||
|
||||
Reference in New Issue
Block a user