aboutsummaryrefslogtreecommitdiffstats
path: root/src/wallet.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet.js')
-rw-r--r--src/wallet.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wallet.js b/src/wallet.js
index 21fbcf2..6395490 100644
--- a/src/wallet.js
+++ b/src/wallet.js
@@ -62,6 +62,7 @@ export class Wallet {
this.price = null;
this.scanning = false;
+ this.loaded = false; // true once a scan/snapshot has populated balances once
this.nextReceiveIndex = 0;
this.nextChangeIndex = 0;
@@ -108,6 +109,7 @@ export class Wallet {
this.addrMap = new Map();
this.utxos = [];
this.txs = [];
+ this.loaded = false;
this.nextReceiveIndex = 0;
this.nextChangeIndex = 0;
}
@@ -204,6 +206,7 @@ export class Wallet {
await this.refreshUtxos();
await this.refreshHistory();
+ this.loaded = true;
} finally {
this.scanning = false;
this.emit();
@@ -540,6 +543,7 @@ export class Wallet {
}
utxos.sort((a, b) => b.value - a.value);
this.utxos = utxos;
+ this.loaded = true;
this.emit();
return { imported: utxos.length, unmatched };
}