aboutsummaryrefslogtreecommitdiff
path: root/lib/wallet
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-10-19 23:40:45 +0200
committerFlorian Dold <florian.dold@gmail.com>2016-10-19 23:40:45 +0200
commit9ccc6626acf66ab4d938bfd836e29124b2dd3558 (patch)
treee2ed566ed32eb9f53b2221733b3277a254225b4d /lib/wallet
parent67e0e02ee071e9e20466b93f69ac25db0c2a88fc (diff)
downloadwallet-core-9ccc6626acf66ab4d938bfd836e29124b2dd3558.tar.xz
have refs in d.ts file instead of .ts file
Diffstat (limited to 'lib/wallet')
-rw-r--r--lib/wallet/wallet.ts26
1 files changed, 12 insertions, 14 deletions
diff --git a/lib/wallet/wallet.ts b/lib/wallet/wallet.ts
index f4b0a83a5..601cf3536 100644
--- a/lib/wallet/wallet.ts
+++ b/lib/wallet/wallet.ts
@@ -1273,20 +1273,18 @@ export class Wallet {
.iter(Stores.exchanges)
.reduce(collectSmallestWithdraw, {}));
- console.log("smallest withdraws", smallestWithdraw)
- await (this.q()
- .iter(Stores.coins)
- .reduce(collectBalances, balance));
-
- await (this.q()
- .iter(Stores.refresh)
- .reduce(collectPendingRefresh, balance));
- await (this.q()
- .iter(Stores.reserves)
- .reduce(collectPendingWithdraw, balance));
- await (this.q()
- .iter(Stores.transactions)
- .reduce(collectPayments, balance));
+ console.log("smallest withdraws", smallestWithdraw);
+
+ let tx = this.q();
+ tx.iter(Stores.coins)
+ .reduce(collectBalances, balance);
+ tx.iter(Stores.refresh)
+ .reduce(collectPendingRefresh, balance);
+ tx.iter(Stores.reserves)
+ .reduce(collectPendingWithdraw, balance);
+ tx.iter(Stores.transactions)
+ .reduce(collectPayments, balance);
+ await tx.finish();
return balance;
}