From ba5e28249aac75310303174ac48b4c67b67224cb Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 5 Jul 2026 22:06:51 -0700 Subject: Exit works on plain-esplora regtest; human-readable ark status lines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit submitPackage falls back to sequential /tx posts when the esplora lacks POST /txs/package (regtest electrs) — works wherever the node relays zero-fee v3 parents. The ark card stops speaking developer: in-flight operations summarize as '{n} deposit(s) confirming' instead of 'board:funded, exit:chain, …', exit lines read 'Exiting N sats — publishing on-chain…', and transient errors show 'hit a snag — retrying automatically' instead of raw gRPC/HTTP text. Co-Authored-By: Claude Fable 5 --- src/features/ark.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/features') diff --git a/src/features/ark.js b/src/features/ark.js index 9a180f7..57a8f82 100644 --- a/src/features/ark.js +++ b/src/features/ark.js @@ -278,9 +278,15 @@ export function arkFeature(ctx) { { class: 'card col', style: 'gap:10px' }, ...head, spendables.length ? row(t('arkVtxos'), String(spendables.length)) : null, - pendingActions.length - ? h('div', { class: 'small muted' }, t('arkPendingActions', { n: pendingActions.length }) + ' — ' + pendingActions.map((a) => `${a.type}:${a.step}`).join(', ')) - : null, + // in-flight operations, summarized in plain words (exits get their own + // per-exit status lines below) + (() => { + const counts = {}; + for (const a of pendingActions) { if (a.type !== 'exit') counts[a.type] = (counts[a.type] || 0) + 1; } + const LABEL = { board: 'arkOpsBoard', send: 'arkOpsSend', refresh: 'arkOpsRefresh', offboard: 'arkOpsOffboard' }; + const parts = Object.entries(counts).map(([type, n]) => t(LABEL[type] || 'arkPendingActions', { n })); + return parts.length ? h('div', { class: 'small muted' }, parts.join(' · ')) : null; + })(), spendables.length >= 1 ? h('button', { class: 'btn-ghost btn-block', disabled: !!ui.arkBusy, onClick: doArkRefresh }, ui.arkBusy === 'refresh' ? h('span', { class: 'spinner sm' }) : t('arkRefreshBtn', { n: spendables.length })) @@ -295,7 +301,7 @@ export function arkFeature(ctx) { a.step === 'chain' ? t('arkExitChainStatus', { n: fmtAmount(a.amountSat) }) : a.step === 'timelock' ? t('arkExitTimelockStatus', { n: fmtAmount(a.amountSat), blocks: String(a.claimableAt) }) : t('arkExitClaimingStatus', { n: fmtAmount(a.amountSat) }), - a.lastError ? h('div', { class: 'small err' }, a.lastError) : null)) + a.lastError ? h('div', { class: 'small faint' }, t('arkExitRetrying')) : null)) ); } -- cgit v1.2.3