From a2d9b4aaa2b118e4114e794ddd802c5f12ab02d6 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 8 Oct 2026 13:39:59 -0700 Subject: Renewal page shows the server's flat renewal fee: the schedule reads '0.2% + 300 sats' and '300 sats' instead of 'free' when the ASP charges a base fee, and the description says automatic renewals wait for the cheapest bracket rather than a free one Co-Authored-By: Claude Opus 5.5 --- src/features/ark.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/features') diff --git a/src/features/ark.js b/src/features/ark.js index 8026ed9..c02b9f9 100644 --- a/src/features/ark.js +++ b/src/features/ark.js @@ -2258,8 +2258,12 @@ export function arkFeature(ctx) { }; // The server prices a renewal by how much lifetime each coin still // carries (its ppm bracket) — waiting IS cheaper, and inside the final - // bracket it's free, where the wallet renews on its own anyway. + // bracket the share is zero, where the wallet renews on its own anyway. + // A flat base fee (the round's on-chain cost, which coinos stopped + // absorbing in October 2026) rides on top of every bracket. const table = (((mgr && mgr.info) || {}).refreshFees || {}).ppmExpiryTable || []; + const baseSat = (((mgr && mgr.info) || {}).refreshFees || {}).baseFeeSat || 0; + const baseCost = fmtSats(baseSat) + ' sats'; const roundMins = Math.max(1, Math.round((((mgr && mgr.info) || {}).roundIntervalSecs || 120) / 60)); const roundEvery = roundMins === 1 ? t('arkCoinsRoundEveryOne') : t('arkCoinsRoundEvery', { n: roundMins }); const ppmFor = (blocks) => (table.filter((e) => e.thresholdBlocks <= blocks).pop()?.ppm) ?? 0; @@ -2286,8 +2290,9 @@ export function arkFeature(ctx) { : i === 0 ? t('arkCoinsSchedOver', { span: span(e.thresholdBlocks) }) : t('arkCoinsSchedBetween', { a: span(e.thresholdBlocks), b: span(arr[i - 1].thresholdBlocks) }), - cost: e.ppm === 0 ? t('arkDepthFree') : (e.ppm / 10000).toLocaleString(undefined, { maximumFractionDigits: 3 }) + '%', - free: e.ppm === 0, + cost: e.ppm === 0 ? (baseSat ? baseCost : t('arkDepthFree')) + : (e.ppm / 10000).toLocaleString(undefined, { maximumFractionDigits: 3 }) + '%' + (baseSat ? ' + ' + baseCost : ''), + free: e.ppm === 0 && !baseSat, })); // Which coins ride the renewal: all by default (the one-button behavior), // any subset by unticking. Selection is per-visit; ids that vanished @@ -2450,7 +2455,9 @@ export function arkFeature(ctx) { h('h4', { style: 'margin:0' }, t('arkCoinsRenewTitle')), // the round cadence comes from the server (it has been an hour and // is two minutes as of September 2026) — never a number baked in here - h('p', { class: 'small muted', style: 'margin:0' }, t('arkCoinsRenewDesc', { every: roundEvery })), + h('p', { class: 'small muted', style: 'margin:0' }, baseSat + ? t('arkCoinsRenewDescBase', { every: roundEvery, base: baseCost }) + : t('arkCoinsRenewDesc', { every: roundEvery })), schedule.length ? h('div', { class: 'col', style: 'gap:2px;margin:2px 0' }, ...schedule.map((r) => h('div', { class: 'row between' }, h('span', { class: 'small muted' }, r.label), -- cgit v1.2.3