aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-04 18:42:49 -0700
committerAdam Soltys <[email protected]>2026-09-04 18:42:49 -0700
commit90641c1244e70179027cf99c5bdab6c6b43dd28c (patch)
tree9d08deb72992579751f0fd23875bf0341d4fd836 /src
parent4431198900b2d1a5cfb73bd02ddfd1e377d9acb9 (diff)
downloadcoinosv3-90641c1244e70179027cf99c5bdab6c6b43dd28c.tar.gz
coinosv3-90641c1244e70179027cf99c5bdab6c6b43dd28c.zip
Spending-coins rows say what they mean: the exit chip reads "exit cost 3,688 sats" (unit included) instead of "exit 3,688", the renewal price moved off the row's right edge into a chip like its siblings — "renewal cost 117 sats" (or "renewal cost free") — and the expiry chip carries a word beside its hourglass ("⏳ expiry 21d"). The depth chip is gone: hop count is implementation detail nobody needed to weigh, and the exit cost already prices its consequence. depthOf and the depth strings retired with it
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MGzU12QrAA4G6BYGzGVdXz
Diffstat (limited to 'src')
-rw-r--r--src/features/ark.js20
-rw-r--r--src/i18n.js8
2 files changed, 12 insertions, 16 deletions
diff --git a/src/features/ark.js b/src/features/ark.js
index 4c65549..b65bce2 100644
--- a/src/features/ark.js
+++ b/src/features/ark.js
@@ -1885,7 +1885,6 @@ export function arkFeature(ctx) {
let exitFee = 0; try { exitFee = estimateExitFeeSat(mgr); } catch {}
const feeRate = Math.max(1, (wallet.feeRates && wallet.feeRates.halfHourFee) || 2);
const afterFee = Math.ceil(530 * feeRate);
- const depthOf = (v) => { try { return mgr._decoded(v).genesis.length; } catch { return null; } };
// relative and terse — "14d" / "13h" beside the hourglass — a date says
// less than a countdown, and a coin past its height says so plainly
// instead of the shifty "0h" (the server still honors it; the wallet's
@@ -1971,7 +1970,6 @@ export function arkFeature(ctx) {
}, t('arkCoinsSelectAll')),
h('span', { class: 'small faint' }, t('arkCoinsSelectAll'))),
...spend.map((v) => {
- const d = depthOf(v);
const f = feeNowOf(v);
const xf = exitFeeOf(v);
return h('label', { class: 'coin' },
@@ -1980,22 +1978,20 @@ export function arkFeature(ctx) {
render();
}),
h('div', { class: 'col grow', style: 'gap:3px;min-width:0' },
- h('div', { class: 'row between', style: 'align-items:baseline;gap:8px' },
- h('span', {}, fmtAmount(v.amountSat),
- h('span', { class: 'small faint' }, ' ' + unitLabel())),
- h('span', { class: 'small ' + (f > 0 ? 'muted' : 'faint') },
- t('arkCoinsRowRenew', { fee: f > 0 ? fmtAmount(f) : t('arkDepthFree') }))),
+ h('span', {}, fmtAmount(v.amountSat),
+ h('span', { class: 'small faint' }, ' ' + unitLabel())),
// little labeled chips instead of a dot-separated line: each
- // fact wears its own pill, wrapping freely on narrow screens
+ // fact wears its own pill, wrapping freely on narrow screens —
+ // the renewal price rides here too, a chip like its siblings
h('div', { class: 'coin-chips' },
h('span', {
class: 'coin-chip' + (v.expiryHeight && tip && v.expiryHeight - tip <= 0 ? ' warn' : ''),
title: t('arkCoinsChipExpTitle'),
- }, '⏳ ' + expiresOf(v)),
- h('span', { class: 'coin-chip', title: t('arkCoinsChipDepthTitle') },
- t('arkCoinsChipDepth', { d: d == null ? '—' : String(d) })),
+ }, '⏳ ' + t('arkCoinsChipExp', { d: expiresOf(v) })),
h('span', { class: 'coin-chip', title: t('arkCoinsChipExitTitle') },
- t('arkCoinsChipExit', { fee: xf == null ? '—' : fmtAmount(xf) })))));
+ t('arkCoinsChipExit', { fee: xf == null ? '—' : fmtAmount(xf) + ' ' + unitLabel() })),
+ h('span', { class: 'coin-chip', title: t('arkCoinsChipRenewTitle') },
+ t('arkCoinsChipRenew', { fee: f > 0 ? fmtAmount(f) + ' ' + unitLabel() : t('arkDepthFree') })))));
})),
h('p', { class: 'small faint', style: 'margin:4px 0 0' }, t('arkCoinsExpiryNote'))),
h('div', { class: 'card col', style: 'gap:8px' },
diff --git a/src/i18n.js b/src/i18n.js
index c6be901..2d3357d 100644
--- a/src/i18n.js
+++ b/src/i18n.js
@@ -227,11 +227,11 @@ const STR = {
arkCoinsTitle: 'Spending coins',
arkCoinsIntro: 'Your Spending balance lives in {n} coins totalling {total}. Each can be pulled on-chain without the server’s help — at a cost that grows with the coin’s history.',
arkCoinsIntroOne: 'Your Spending balance lives in a single coin of {total}. It can be pulled on-chain without the server’s help — at a cost that grows with the coin’s history.',
- arkCoinsRowRenew: 'renew {fee}',
- arkCoinsChipDepth: 'depth {d}',
- arkCoinsChipExit: 'exit {fee}',
+ arkCoinsChipExp: 'expiry {d}',
+ arkCoinsChipExit: 'exit cost {fee}',
+ arkCoinsChipRenew: 'renewal cost {fee}',
+ arkCoinsChipRenewTitle: 'What renewing this coin costs',
arkCoinsChipExpTitle: 'Time until this coin needs renewal',
- arkCoinsChipDepthTitle: 'How many off-chain hops this coin carries',
arkCoinsChipExitTitle: 'What pulling this coin on-chain by itself would cost',
arkFeeChain: 'On-chain fee',
arkFeeService: 'Service fee',