diff options
| author | Adam Soltys <[email protected]> | 2026-09-24 17:27:00 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-24 17:27:00 -0700 |
| commit | e4ed03b5caa874fad189c6a90b3e09da5530d58d (patch) | |
| tree | 58bbea4d155e0b911d226dacbf0aa4b8c908758f /src/ark | |
| parent | 339a86c4c1134412cd32dd16ac719d3bcfdff367 (diff) | |
| download | coinosv3-e4ed03b5caa874fad189c6a90b3e09da5530d58d.tar.gz coinosv3-e4ed03b5caa874fad189c6a90b3e09da5530d58d.zip | |
Coins page: a renewal in flight keeps the whole page; a renewal you asked for is in history.
Tapping Renew marked the coins pending and the page, finding nothing
spendable, collapsed to a single "Pending: N sats" line — no table, no
exit explainer. Coins in a round now stay in the table (greyed, tagged
renewing), with a card saying where the round is (queued, in a round
waiting for a confirmation, finishing). The page no longer closes on Renew.
History: a manual renewal shows as "Renewing · in progress" while the round
runs, and as "Renewed" after, even when it was free (automatic free
renewals stay out of history, as before).
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Diffstat (limited to 'src/ark')
| -rw-r--r-- | src/ark/manager.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ark/manager.js b/src/ark/manager.js index 928edf8..7f24b7d 100644 --- a/src/ark/manager.js +++ b/src/ark/manager.js @@ -1854,7 +1854,9 @@ export class ArkManager { return this.info.refreshFees.baseFeeSat + Math.ceil(ppmUnits / 1_000_000); } - async refresh(vtxoIds) { + // manual: the user asked for this one (the coins page) — it earns a + // history row even when free; the wallet's own renewals only when they cost + async refresh(vtxoIds, { manual = false } = {}) { const inputs = (vtxoIds ? vtxoIds.map((id) => this._vtxo(id)) : this.state.vtxos.filter((v) => v.state === 'spendable')); @@ -1873,7 +1875,7 @@ export class ArkManager { id: `refresh-${Date.now()}`, type: 'refresh', step: 'created', inputIds: inputs.map((v) => v.id), outKeyIndex: this.state.nextKeyIndex++, - outAmountSat: totalSat - feeSat, feeSat, + outAmountSat: totalSat - feeSat, feeSat, manual: !!manual, inAmountSat: totalSat, }; for (const v of inputs) v.state = 'pending'; this.state.actions.push(action); @@ -2005,7 +2007,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, 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', unlockHash: action.unlockHash, inputIds: [...(action.inputIds || [])], detail: `${inputRecs.length} in -> ${newVtxos.length} out${action.feeSat ? ` · fee ${action.feeSat} sat` : ''}` }); this._save(); } } |
