From 202dced76eb8617c094686ef86caa979c0074320 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 3 Oct 2026 16:05:42 -0700 Subject: Renewing asks first, and a renewal links to its round's transaction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 Claude-Session: https://claude.ai/code/session_01ULQZS9MQa6iAsXnrJUD9Du --- src/ark/manager.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/ark/manager.js') 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(); } } -- cgit v1.2.3