Override dry run: dollar amounts were 100x (cents shown as dollars); POL amounts were right
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -57,7 +57,7 @@ async function report(from, to) {
|
||||
const c = cfg(); const rows = [], per = {};
|
||||
for (const p of purchases()) {
|
||||
if (p.ts < from || p.ts >= to || (c.goLive && p.ts < c.goLive)) continue;
|
||||
const wei = BigInt(p.paidWei || '0') * BigInt(PCT) / 100n, cents = Math.round((p.priceCents || 0) * PCT) / 100;
|
||||
const wei = BigInt(p.paidWei || '0') * BigInt(PCT) / 100n, cents = Math.round((p.priceCents || 0) * PCT) / 10000; // dollars: price cents x 3% / 100
|
||||
const r = await recipientFor(p.buyerId).catch(e => ({ recipientId: 0, reason: 'read failed: ' + e.message }));
|
||||
rows.push({ tx: p.tx, ts: p.ts, buyerId: p.buyerId, priceCents: p.priceCents, overrideWei: wei.toString(), overrideUsd: cents, recipientId: r.recipientId, hops: r.hops || 0, skipped: r.skipped || [], reason: r.reason || '' });
|
||||
if (r.recipientId) { const o = per[r.recipientId] = per[r.recipientId] || { recipientId: r.recipientId, purchases: 0, wei: 0n, usd: 0 }; o.purchases++; o.wei += wei; o.usd += cents; }
|
||||
|
||||
Reference in New Issue
Block a user