diff options
| -rw-r--r-- | src/features/ark.js | 7 | ||||
| -rw-r--r-- | src/i18n.js | 4 |
2 files changed, 8 insertions, 3 deletions
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 diff --git a/src/i18n.js b/src/i18n.js index 6e80d20..ac9abd2 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -199,10 +199,10 @@ const STR = { onbBoardTitle: 'Top up Spending', onbBoardBody: 'Move some sats from Savings into Spending — payments there are instant, with no mining fees.', topUpFromSavings: 'Top up from Savings', - arkDepthNotice: 'Self-custody exit currently costs about {fee} sats in mining fees. Renew for {renew} to bring that down.', + arkDepthNotice: 'Self-custody exit currently costs about {fee} sats in mining fees. Renew for {renew} to bring that down to about {after} sats.', arkDepthFree: 'free', arkDepthBtn: 'Renew now', - arkDepthRenewed: 'Renewal requested — your coins flatten when the next round completes.', + arkDepthRenewed: 'Renewal requested — it completes with the next round.', arkUniUneconomical: 'A trustless on-chain exit would cost about {fee} sats in mining fees — more than the {n} sats it would move, so it isn’t offered. For a balance this size, send it out over Lightning instead: no mining fees at all.', arkUniFallbackBody: 'The server didn’t cooperate, but your money can still move without it: your whole Spending balance exits to Savings on-chain. It takes about a day, and roughly {fee} sats of mining fees will be paid from Savings. Funds land in Savings — send them on from there once it completes.', arkUniFallbackShort: 'Savings holds {have} sats — about {need} sats are needed for the mining fees. Top up Savings first.', |
