Remove every MoonPay mention and link (ZeroFox/MoonPay false-positive takedown, 2026-10-26)

- server.js: /api/moonpay-url endpoint deleted (MOONPAY_PUBLIC_KEY / MOONPAY_SECRET_KEY env and siteConfig().moonpayPublicKey no longer read)
- admin.js: moonpayPublicKey settings label dropped
- credits.html + credits-screen.js: "Buy POL with a card" button and handler removed
- my.js: openMoonpay() and the card-buy button removed; the New to crypto note now points to /wallets ("Wallet help")
- wallets.html + wallets.js: card section rewritten neutrally (any major exchange or on-ramp, POL on Polygon, your own address), wlMoonpay button logic, in-wallet note and MoonPay FAQ/disclaimer replaced
- chatbot.js: wallets canned answer, tags/regex and FACTS rewritten with no brand named
- kb-seed.js: f-moonpay-declined replaced by f-card-declined (the old seed is retired from kb.json on the next boot unless it was admin-edited)
- qa/kb-retrieval.cjs: case updated to f-card-declined
- cache tags bumped: credits-screen.js, my.js, wallets.js ?v=20261026a

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-26 08:04:32 -05:00
parent 399a2bcc38
commit c037923528
11 changed files with 25 additions and 88 deletions
+3 -23
View File
@@ -1915,23 +1915,6 @@
// ── in-dashboard package buying ──
const PKG = { 1: 'Micro', 2: 'Activation', 3: 'Builder', 4: 'Growth', 5: 'Leader' };
// Card on-ramp: buy POL with a card via MoonPay, delivered to the buyer's own
// wallet. Signed + wallet-prefilled once MoonPay keys are set; generic page
// otherwise. The site never touches funds — MoonPay is merchant of record.
async function openMoonpay(pol) {
try {
let addr = '';
try { const me = await (await fetch('/api/me')).json(); addr = me.address || ''; } catch (e) {}
const q = '/api/moonpay-url?pol=' + encodeURIComponent(pol || '') + (addr ? '&address=' + encodeURIComponent(addr) : '');
const r = await (await fetch(q)).json();
if (r && r.url) {
window.open(r.url, '_blank', 'noopener');
IAP.status(r.signed
? 'MoonPay opened in a new tab with your wallet address pre-filled. Choose POL on Polygon, finish the purchase, then come back and buy your package.'
: 'MoonPay opened in a new tab. Choose POL on the Polygon network and paste your own wallet address as the destination, then come back.', 'ok');
}
} catch (e) { IAP.status('Could not open MoonPay: ' + ((e && e.message) || e), 'bad'); }
}
// ── linked positions (Qualified Start) ──
const short = a => a ? a.slice(0, 6) + '…' + a.slice(-4) : '';
let noPayoutAddrs = new Set(); // positions the site refuses to buy from (see siteConfig.noPayoutIds)
@@ -2072,15 +2055,12 @@
} catch (e) { IAP.status('Purchase failed: ' + ((e && e.message) || e), 'bad'); }
finally { b.disabled = false; }
}));
// brand new to crypto? buy POL with a card, sent straight to the wallet
const builder = products.find(p => p.priceCents === 5000) || products[products.length - 1];
const needPol = (builder && builder.costWei) ? Math.max(30, Math.ceil(Number(builder.costWei) / 1e18) + 3) : 30;
// brand new to crypto? point to the wallet guide (buy POL on any exchange or on-ramp, send it to your own wallet)
const cta = document.createElement('div');
cta.style.cssText = 'grid-column:1/-1;margin-top:10px;text-align:center';
cta.innerHTML = '<p class="muted small" style="margin:0 0 8px">New to crypto? Buy POL with a debit or credit card, Apple Pay, or Google Pay. It lands straight in your own wallet, and this site never touches your money.</p>'
+ '<button class="btn small sec" id="moonpayBtn" type="button">💳 Buy POL with a card</button> <a class="btn small sec" href="/wallets" target="_blank" rel="noopener">Wallet and MoonPay guide</a>';
cta.innerHTML = '<p class="muted small" style="margin:0 0 8px">New to crypto? Buy POL with a card on any major exchange or on-ramp, then send it to your own wallet on the Polygon network. This site never touches your money.</p>'
+ '<a class="btn small sec" href="/wallets" target="_blank" rel="noopener">Wallet help</a>';
wrap.appendChild(cta);
const mb = $('moonpayBtn'); if (mb) mb.addEventListener('click', () => openMoonpay(needPol));
} catch (e) {}
}
loadBuyTiles();