Balances: show earned and bonus credits that live campaigns already hold (Jim's Wired Wednesday bonus read as +0 earned); PassiveDrip bridge PD_SYNC_APPLY=0 read-only mode while pointed at staging
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -1687,7 +1687,7 @@ const server = http.createServer(async (req, res) => {
|
||||
out.buyerCount = mm.buyerCount;
|
||||
out.onchainSponsorId = mm.sponsorId;
|
||||
const bal = await ads.balances((await myMemberIds(s)).ids, s.email);
|
||||
out.credits = bal.total; out.creditedCredits = bal.credited; out.earnedCredits = bal.earned; out.inCampaigns = bal.inCampaigns; out.availableCredits = bal.available;
|
||||
out.credits = bal.total; out.creditedCredits = bal.credited; out.earnedCredits = bal.earned; out.earnedReserved = bal.earnedReserved; out.inCampaigns = bal.inCampaigns; out.availableCredits = bal.available;
|
||||
} catch (e) { out.chainReadError = true; }
|
||||
}
|
||||
return json(res, 200, out);
|
||||
@@ -1750,7 +1750,7 @@ const server = http.createServer(async (req, res) => {
|
||||
for (const id of mine.ids) if (id && id !== memberId) { try { out.buyerCountPositions += (await chain.member(id)).buyerCount || 0; } catch (e) {} }
|
||||
out.buyerCountAll = out.buyerCountMain + out.buyerCountPositions; // badges count every position; levels the contract pays #main on depend on buyerCount alone
|
||||
const bal = await ads.balances(mine.ids, s.email);
|
||||
out.credits = bal.total; out.creditedCredits = bal.credited; out.earnedCredits = bal.earned; out.inCampaigns = bal.inCampaigns; out.availableCredits = bal.available;
|
||||
out.credits = bal.total; out.creditedCredits = bal.credited; out.earnedCredits = bal.earned; out.earnedReserved = bal.earnedReserved; out.inCampaigns = bal.inCampaigns; out.availableCredits = bal.available;
|
||||
} catch (e) { out.chainReadError = true; }
|
||||
let earned = 0n, n = 0;
|
||||
for (const ev of chain.recentEvents(1e9)) { // whole history, not the last 600
|
||||
|
||||
Reference in New Issue
Block a user