aboutsummaryrefslogtreecommitdiffstats
path: root/src/wallet.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-06-15 09:24:32 -0700
committerAdam Soltys <[email protected]>2026-06-15 09:24:32 -0700
commit92b27e7d6de51ae178f068b079d3eec017689d85 (patch)
tree8783d96fe096f0633013991355bf3ef44f081088 /src/wallet.js
parent8a2bb0790d581ff67325966b3e37d6b2500128b5 (diff)
downloadcoinosv3-92b27e7d6de51ae178f068b079d3eec017689d85.tar.gz
coinosv3-92b27e7d6de51ae178f068b079d3eec017689d85.zip
Drop live badge + fiat price; persist wallet in sessionStorage
- 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) <[email protected]>
Diffstat (limited to 'src/wallet.js')
-rw-r--r--src/wallet.js10
1 files changed, 2 insertions, 8 deletions
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;