diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/wallet.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/wallet.js b/src/wallet.js index b0cd963..33a1f3f 100644 --- a/src/wallet.js +++ b/src/wallet.js @@ -494,6 +494,17 @@ export class Wallet { this.utxos.push({ txid: u.txid, vout: u.vout, value: u.value, address, chain: p.chain, index: p.index, confirmed: conf }); } if (entry) { entry.confirmed = eConf; entry.pending = ePend; } + // Also refresh this address's tx history so a pending→confirmed transition + // shows in History on the next poll — not only via the realtime push, + // which regtest / custom-explorer (non-WS) backends don't have. + try { + const list = await this.api.addressTxs(address); + for (const tx of list) { + const summary = this._txSummary(tx); + const at = this.txs.findIndex((t) => t.txid === tx.txid); + if (at >= 0) this.txs[at] = summary; else this.txs.push(summary); + } + } catch {} changed = true; } return changed; |
