From 0d2621defdadd66a12aae593476b5286aadc18dd Mon Sep 17 00:00:00 2001 From: martbost Date: Sat, 19 Sep 2026 13:16:03 -0500 Subject: [PATCH] missed: list each tier's skips in walk order Co-Authored-By: Claude Fable 5.1 --- missed.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/missed.js b/missed.js index f2c1eda..e7b199c 100644 --- a/missed.js +++ b/missed.js @@ -28,7 +28,7 @@ function composeMissed(txEvents, who, had, site) { const lines = ['\u{1F62C} Missed payouts on ' + who(buy.buyerId) + "'s " + price + ' purchase:']; const passed = new Set(); let walked = 0; for (const tier of [2, 3]) { - const sk = skips.filter(s => Number(s.tier) === tier); + const sk = skips.filter(s => Number(s.tier) === tier).sort((x, y) => Number(x.li || 0) - Number(y.li || 0)); // walk order: nearest first if (!sk.length) continue; const paid = txEvents.find(e => e.type === 'TierPaid' && Number(e.tier) === tier); const pol = paid ? Number(fmtPol(paid.amountWei)) : Number(fmtPol(BigInt(String(buy.paidWei || 0)) * BigInt(Math.round(SHARE[tier] * 100)) / 100n));