From 92b27e7d6de51ae178f068b079d3eec017689d85 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 15 Jun 2026 09:24:32 -0700 Subject: Drop live badge + fiat price; persist wallet in sessionStorage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove the online/live status badge and the USD price line, which both appeared after load and caused layout shift. Stop fetching price entirely. - Persist the seed + passphrase in sessionStorage so a page refresh restores the open wallet instead of returning to the unlock screen. Cleared on logout and (by the browser) when the tab closes. Note: sessionStorage holds the seed in plaintext for the tab session — an acceptable tradeoff for this self-custody tool and scoped to the tab. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/wallet.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/wallet.js') diff --git a/src/wallet.js b/src/wallet.js index 77ec97e..3627275 100644 --- a/src/wallet.js +++ b/src/wallet.js @@ -59,7 +59,6 @@ export class Wallet { this.utxos = []; // { txid, vout, value, address, chain, index, confirmed } this.txs = []; // aggregated history this.feeRates = null; - this.price = null; this.scanning = false; this.loaded = false; // true once a scan/snapshot has populated balances once @@ -219,12 +218,9 @@ export class Wallet { this.nextReceiveIndex = firstUnused(this.receive); this.nextChangeIndex = firstUnused(this.change); - // Fees/price are only needed at load — skip on routine background polls. + // Fees are only needed at load — skip on routine background polls. if (!silent || !this.feeRates) { - [this.feeRates, this.price] = await Promise.all([ - this.api.feeRates(), - this.api.price(), - ]); + this.feeRates = await this.api.feeRates(); } await this.refreshUtxos(); @@ -524,7 +520,6 @@ export class Wallet { netName: this.netName, exportedAt: new Date().toISOString(), feeRates: this.feeRates, - price: this.price, nextReceiveIndex: this.nextReceiveIndex, nextChangeIndex: this.nextChangeIndex, utxos: this.utxos.map((u) => ({ @@ -547,7 +542,6 @@ export class Wallet { ); this.feeRates = snap.feeRates || this.feeRates; - this.price = snap.price || this.price; this.nextReceiveIndex = snap.nextReceiveIndex || 0; this.nextChangeIndex = snap.nextChangeIndex || 0; -- cgit v1.2.3