aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-28 19:26:40 -0700
committerAdam Soltys <[email protected]>2026-08-28 19:26:40 -0700
commita8e4358fd2b869a9471e265b11c1bda18764dfbe (patch)
tree59bfca761d4e871c2d4f21a5d7b6091f79020b73
parente082396d99c69adb580ea9cbf5a1be856f1f0d2f (diff)
downloadcoinosv3-a8e4358fd2b869a9471e265b11c1bda18764dfbe.tar.gz
coinosv3-a8e4358fd2b869a9471e265b11c1bda18764dfbe.zip
The explorer link stops blinking with the retry loop — it shows only for transactions genuinely broadcast — and the ETA drops its tilde: "about 25 hours" says approximate once, in words
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019eA8JRq9Wr7z2fRQk99HLi
-rw-r--r--src/features/ark.js24
-rw-r--r--src/i18n.js2
2 files changed, 15 insertions, 11 deletions
diff --git a/src/features/ark.js b/src/features/ark.js
index 953de5a..14ac9c1 100644
--- a/src/features/ark.js
+++ b/src/features/ark.js
@@ -869,9 +869,13 @@ export function arkFeature(ctx) {
}
const exitStartedTs = (a) => Number((a.id || '').split('-')[1]) || Date.now();
+ // Only link a tx that is KNOWN to be out there: the claim, a confirmed
+ // hop, or the finished chain. Guessing from lastError made the link
+ // flicker in time with the retry loop.
const exitWatchTxid = (a) => a.claimTxid
- || ((a.hopsDone > 0 || (a.step !== 'chain') || !a.lastError)
- ? (a.txids || [])[Math.min(a.hopsDone || 0, (a.txids || []).length - 1)] : null);
+ || (a.step !== 'chain' ? (a.txids || [])[(a.txids || []).length - 1]
+ : a.hopsDone > 0 ? (a.txids || [])[Math.min(a.hopsDone, (a.txids || []).length - 1)]
+ : null);
function arkExitActionItem(a) {
return h('div', { class: 'item', style: 'cursor:pointer', onClick: () => { ui.arkExitDetail = a.id; render(); } },
@@ -890,9 +894,9 @@ export function arkFeature(ctx) {
: a.step === 'timelock' ? Math.max(0, a.claimableAt - (a.tipSeen || 0)) + 1 : 1;
const mins = blocks * 10;
const eta = getNetwork() === 'regtest' ? t('arkExitSoon')
- : mins >= 2880 ? `≈ ${Math.round(mins / 1440)} d`
- : mins >= 120 ? `≈ ${Math.round(mins / 60)} h`
- : `≈ ${mins} min`;
+ : mins >= 2880 ? `${Math.round(mins / 1440)} days`
+ : mins >= 120 ? `${Math.round(mins / 60)} hours`
+ : `${mins} minutes`;
const watch = exitWatchTxid(a);
const url = watch ? wallet.api.explorerTx(watch) : null;
const cancellable = a.actionable && !(a.hopsDone > 0) && a.step === 'chain';
@@ -2177,15 +2181,15 @@ export function arkFeature(ctx) {
: 1;
const mins = Math.max(...acts.map(blocksFor)) * 10;
const eta = getNetwork() === 'regtest' ? t('arkExitSoon')
- : mins >= 2880 ? `≈ ${Math.round(mins / 1440)} d`
- : mins >= 120 ? `≈ ${Math.round(mins / 60)} h`
- : `≈ ${mins} min`;
+ : mins >= 2880 ? `${Math.round(mins / 1440)} days`
+ : mins >= 120 ? `${Math.round(mins / 60)} hours`
+ : `${mins} minutes`;
// The most advanced tx that's actually out there — the one worth watching.
// A chain hop that errored before broadcast has nothing to link yet.
let watch = null, watchScore = -1;
for (const a of acts) {
- const score = a.step === 'claiming' ? 3 : a.step === 'timelock' ? 2 : (a.hopsDone > 0 || !a.lastError) ? 1 : 0;
- const txid = a.claimTxid || (a.txids || [])[Math.min(a.hopsDone || 0, (a.txids || []).length - 1)];
+ const score = a.step === 'claiming' ? 3 : a.step === 'timelock' ? 2 : a.hopsDone > 0 ? 1 : 0;
+ const txid = exitWatchTxid(a);
if (score > 0 && txid && score > watchScore) { watch = txid; watchScore = score; }
}
const err = acts.find((a) => a.lastError && a.actionable);
diff --git a/src/i18n.js b/src/i18n.js
index e8bb52c..234c622 100644
--- a/src/i18n.js
+++ b/src/i18n.js
@@ -201,7 +201,7 @@ const STR = {
topUpFromSavings: 'Top up from Savings',
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.',
- arkUniFallbackBtn: 'Exit to Savings (≈ {fee} sats in fees)',
+ arkUniFallbackBtn: 'Exit to Savings ({fee} sats in fees)',
msgPushOffer: 'Get notified when you receive payments and messages, even with coinos closed.',
msgPushEnable: 'Enable notifications',
msgPushOn: 'Notifications on',