aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-28 19:40:20 -0700
committerAdam Soltys <[email protected]>2026-08-28 19:40:20 -0700
commit560c52c91d66181744c120187506399065e92c44 (patch)
tree24c6729d0ab9372bf3bbd6956ec713bcc8b80447 /src
parentefd504ece47e684f77d85de990e97d90af0c221b (diff)
downloadcoinosv3-560c52c91d66181744c120187506399065e92c44.tar.gz
coinosv3-560c52c91d66181744c120187506399065e92c44.zip
The exit-cost advisory moves to where eyes already are: a quiet line under the Spending balance — current trustless-exit price, the renewal that shrinks it, one inline Renew now — instead of a settings card nobody would know to dig for
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019eA8JRq9Wr7z2fRQk99HLi
Diffstat (limited to 'src')
-rw-r--r--src/features/ark.js15
-rw-r--r--src/i18n.js3
2 files changed, 9 insertions, 9 deletions
diff --git a/src/features/ark.js b/src/features/ark.js
index 66eef18..be5bdd7 100644
--- a/src/features/ark.js
+++ b/src/features/ark.js
@@ -1472,7 +1472,7 @@ export function arkFeature(ctx) {
// Most users never need to think about this — the card only appears once
// coins run deep enough for the difference to matter.
const EXIT_DEPTH_ADVISORY = 4;
- function exitDepthCard() {
+ function exitDepthNotice() {
if (!arkAvailable() || wallet.watchOnly || !ark || !ark.state) return null;
const spend = (ark.state.vtxos || []).filter((v) => v.state === 'spendable');
if (!spend.length) return null;
@@ -1481,11 +1481,10 @@ 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 {}
- return h('div', { class: 'card col', style: 'gap:8px' },
- h('h3', {}, t('arkDepthTitle')),
- h('p', { class: 'small muted', style: 'margin:0' },
- t('arkDepthBody', { d: String(depth), fee: fmtAmount(exitFee), renew: renewFee > 0 ? fmtAmount(renewFee) + ' sats' : t('arkDepthFree') })),
- h('button', { class: 'btn-block', disabled: !!ui.arkBusy, onClick: () => {
+ 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') }),
+ ' ',
+ h('button', { class: 'linklike small', disabled: !!ui.arkBusy, onClick: () => {
// fire and let the round machinery carry it — rounds can be an hour out
ark.refresh(spend.map((v) => v.id)).catch((e) => toast(e.message));
toast(t('arkDepthRenewed'));
@@ -2352,7 +2351,7 @@ export function arkFeature(ctx) {
// swaps feature): the ASP pays invoices natively over ark.
canLnPay() { return arkAvailable() && !wallet.watchOnly && !!(ark && ark.info); },
lnSpendableSat() { const b = arkBalance(); return b ? b.spendableSat : 0; },
- settingsCards() { return [autoWithdrawCard(), exitDepthCard()]; },
+ settingsCards() { return [autoWithdrawCard()]; },
// The onboarding wizard's top-up step borrows the board form wholesale.
arkBoardForm() {
if (!arkAvailable() || wallet.watchOnly) return null;
@@ -2535,6 +2534,8 @@ export function arkFeature(ctx) {
amount: fmtAmount(arkRenewWarn.sat) + ' ' + unitLabel(),
date: new Date(arkRenewWarn.deadlineMs).toLocaleDateString(),
})));
+ const depthNotice = exitDepthNotice();
+ if (depthNotice) out.push(depthNotice);
// An upcoming renewal that will COST something — stated before it
// happens. Ark is new to nearly everyone, and a fee nobody announced
// reads as money gone missing (it did, once). Free renewals — the
diff --git a/src/i18n.js b/src/i18n.js
index 624ca15..6e80d20 100644
--- a/src/i18n.js
+++ b/src/i18n.js
@@ -199,8 +199,7 @@ 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',
- arkDepthTitle: 'Advanced · exit cost',
- arkDepthBody: 'Your coins’ off-chain history is {d} hops deep. A trustless exit would currently cost about {fee} sats in mining fees — each hop is one more on-chain transaction. Renewing now flattens the history back to a single hop for {renew}.',
+ arkDepthNotice: 'Self-custody exit currently costs about {fee} sats in mining fees. Renew for {renew} to bring that down.',
arkDepthFree: 'free',
arkDepthBtn: 'Renew now',
arkDepthRenewed: 'Renewal requested — your coins flatten when the next round completes.',