aboutsummaryrefslogtreecommitdiffstats
path: root/src/api.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/api.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/api.js')
-rw-r--r--src/api.js13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/api.js b/src/api.js
index ea8461e..43d2bae 100644
--- a/src/api.js
+++ b/src/api.js
@@ -142,19 +142,6 @@ export class Api {
return { fastestFee: 20, halfHourFee: 10, hourFee: 5, economyFee: 2, minimumFee: 1 };
}
- // Only mempool.space exposes a price endpoint; price is non-critical.
- async price() {
- const h = this._hosts.find((x) => x.base.includes('mempool'));
- if (!h || h.cooldownUntil > Date.now()) return null;
- try {
- const res = await fetch(h.base + '/v1/prices');
- if (!res.ok) return null;
- const p = await res.json();
- return p && p.USD ? p.USD : null;
- } catch {
- return null;
- }
- }
async broadcast(hexTx) {
if (this.offline) throw new Error('offline');