From 30ca37f5acfcfb083f1b78cd91a1faa7ccbba6d4 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 28 Aug 2026 19:43:03 -0700 Subject: The advisory names both prices: "renew for 2 sats to bring that down to about 1,060" — and stays silent when renewing wouldn't actually help; the toast learns to speak in one plain breath MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_019eA8JRq9Wr7z2fRQk99HLi --- src/features/ark.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/features') diff --git a/src/features/ark.js b/src/features/ark.js index be5bdd7..12362cc 100644 --- a/src/features/ark.js +++ b/src/features/ark.js @@ -1481,8 +1481,13 @@ export function arkFeature(ctx) { if (depth < EXIT_DEPTH_ADVISORY) return null; let exitFee = 0; try { exitFee = estimateExitFeeSat(ark); } catch {} let renewFee = 0; try { renewFee = ark.refreshFee(spend, ark._tipH || 0); } catch {} + // after a renewal everything is ONE coin, ONE hop: parent + its fee + // child + the claim, ~530 vB all in at today's rate + const feeRate = Math.max(1, (wallet.feeRates && wallet.feeRates.halfHourFee) || 2); + const afterFee = Math.ceil(530 * feeRate); + if (afterFee >= exitFee) return null; // renewing wouldn't help — stay quiet return h('div', { class: 'small muted', style: 'margin:10px 0 0;text-align:center' }, - t('arkDepthNotice', { fee: fmtAmount(exitFee), renew: renewFee > 0 ? fmtAmount(renewFee) + ' sats' : t('arkDepthFree') }), + t('arkDepthNotice', { fee: fmtAmount(exitFee), renew: renewFee > 0 ? fmtAmount(renewFee) + ' sats' : t('arkDepthFree'), after: fmtAmount(afterFee) }), ' ', h('button', { class: 'linklike small', disabled: !!ui.arkBusy, onClick: () => { // fire and let the round machinery carry it — rounds can be an hour out -- cgit v1.2.3