From 55b010d8c2ab863ea184e535e3d7af3fab808121 Mon Sep 17 00:00:00 2001 From: martbost Date: Thu, 10 Sep 2026 08:21:15 -0500 Subject: [PATCH] Admin burner line: balance is the gas fund, not a cost; show skipped burns Co-Authored-By: Claude Fable 5.1 --- public/admin.html | 2 +- public/assets/admin.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/admin.html b/public/admin.html index 929d41c..b3e958f 100644 --- a/public/admin.html +++ b/public/admin.html @@ -306,6 +306,6 @@ - + diff --git a/public/assets/admin.js b/public/assets/admin.js index 2f4e060..a26158f 100644 --- a/public/assets/admin.js +++ b/public/assets/admin.js @@ -322,7 +322,7 @@ + [['Owner / fee A (Tangem)', W.feeA, B.feeA], ['Fee B', W.feeB, B.feeB], ['Engine (gas)', W.engine, B.engine]].filter(x => x[1]).map(x => '' + x[0] + '' + esc(x[1]) + '' + (x[2] == null ? '?' : pol(x[2]) + ' POL') + '').join(''); $('pnlFixed').value = r.fixedMonthlyUsd || 0; const b = r.burner || {}; - $('burnerLine').textContent = !b.hasEthers ? 'ethers is not installed in this build.' : !b.keyPresent ? 'No engine key configured (ENGINE_KEY). Burns stay pending until it is set.' : b.mismatch ? 'ENGINE_KEY does not match the contract engine signer. Disabled.' : 'Engine ' + b.address + ' · ' + pol(b.balanceWei) + ' POL for gas · burned ' + b.burned + ' since boot' + (b.lastRun ? ' · last run ' + when(b.lastRun) : '') + (b.lastError ? ' · last error: ' + b.lastError : ''); + $('burnerLine').textContent = !b.hasEthers ? 'ethers is not installed in this build.' : !b.keyPresent ? 'No engine key configured (ENGINE_KEY). Burns stay pending until it is set.' : b.mismatch ? 'ENGINE_KEY does not match the contract engine signer. Disabled.' : 'Engine wallet ' + b.address + ' holds ' + pol(b.balanceWei) + ' POL. That is its gas fund, not a cost: one burn uses about 0.003 POL (roughly 48,000 gas), paid by this wallet, never by the member. ' + b.burned + ' burn' + (b.burned === 1 ? '' : 's') + ' since boot' + (b.lastRun ? ' · last check ' + when(b.lastRun) : '') + (b.lastError ? ' · last error: ' + b.lastError : '') + (b.skipped && Object.keys(b.skipped).length ? ' · skipped (needs review): ' + Object.entries(b.skipped).map(([k, v]) => k + ' (' + v + ')').join(', ') : ''); } document.querySelectorAll('#pnlPeriods [data-days]').forEach(b => b.addEventListener('click', () => { pnlDays = Number(b.dataset.days); document.querySelectorAll('#pnlPeriods [data-days]').forEach(x => x.classList.toggle('on', x === b)); loadPnl().catch(e => IAP.status(e.message, 'bad')); })); if ($('pnlFixedSave')) $('pnlFixedSave').addEventListener('click', async () => { try { await api('/api/admin/site', { pnlFixedMonthlyUsd: Number($('pnlFixed').value) || 0 }, 'PATCH'); IAP.status('Saved.', 'ok'); loadPnl(); } catch (e) { IAP.status(e.message, 'bad'); } });