aboutsummaryrefslogtreecommitdiffstats
path: root/src/ark
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-03 16:05:42 -0700
committerAdam Soltys <[email protected]>2026-10-03 16:05:42 -0700
commit202dced76eb8617c094686ef86caa979c0074320 (patch)
tree3c3e37783983f4987bac1e278294b13496dfa430 /src/ark
parent328f2db9af46cda473318bb3eada0f6e83bb42f1 (diff)
downloadcoinosv3-202dced76eb8617c094686ef86caa979c0074320.tar.gz
coinosv3-202dced76eb8617c094686ef86caa979c0074320.zip
Renewing asks first, and a renewal links to its round's transaction
- The coins page's Renew button opens a confirmation instead of renewing at once: how many coins, their amount, the fee, and what is left to spend meanwhile — with a red notice when that is nothing (the button selects every coin by default, which is how a user locked their whole balance for an hour on 2026-10-03). It says the coins can't be spent until the round's transaction confirms and that a renewal can't be cancelled; the wallet renews for free near expiry anyway. The inline notice from 328f2db moves into it. - A renewal keeps its round's transaction id as soon as the round has run (before it confirms): the in-progress card on the coins page links to it, and the finished renewal's history row carries it, so its detail shows the id with View/Copy like any on-chain movement. Renewals finished before this change have no id recorded. tools/ark/renew-confirm-ui-test.js, tools/ark/renew-txid-test.js Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01ULQZS9MQa6iAsXnrJUD9Du
Diffstat (limited to 'src/ark')
-rw-r--r--src/ark/manager.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ark/manager.js b/src/ark/manager.js
index a114702..1cf1d7a 100644
--- a/src/ark/manager.js
+++ b/src/ark/manager.js
@@ -2143,6 +2143,9 @@ export class ArkManager {
}
if (status.status === 0 || !status.fundingTx) return; // round pending; retry on next sync
const fundingTx = parseTx(status.fundingTx);
+ // The round has run: its transaction is on the network from here on,
+ // and is what the wait is for — kept so the wallet can link to it.
+ if (action.fundingTxid !== fundingTx.txid) { action.fundingTxid = fundingTx.txid; this._save(); }
const confirmed = await this.chain.getTxStatus(fundingTx.txid);
if (!confirmed?.confirmed) return; // wait for funding confirmations
action.fundingTxHex = hex.encode(status.fundingTx);
@@ -2185,7 +2188,7 @@ export class ArkManager {
// inputIds let the history skip "spent elsewhere" rows for coins this
// renewal consumed — reconciled before the claim, they'd otherwise
// stand as spends that the renewed coin silently contradicts.
- this._movement({ type: 'refresh', amountSat: action.outAmountSat, feeSat: action.feeSat || 0, manual: !!action.manual, status: 'complete', unlockHash: action.unlockHash, inputIds: [...(action.inputIds || [])], detail: `${inputRecs.length} in -> ${newVtxos.length} out${action.feeSat ? ` · fee ${action.feeSat} sat` : ''}` });
+ this._movement({ type: 'refresh', amountSat: action.outAmountSat, feeSat: action.feeSat || 0, manual: !!action.manual, status: 'complete', txid: fundingTx.txid, unlockHash: action.unlockHash, inputIds: [...(action.inputIds || [])], detail: `${inputRecs.length} in -> ${newVtxos.length} out${action.feeSat ? ` · fee ${action.feeSat} sat` : ''}` });
this._save();
}
}