From 9ccc6626acf66ab4d938bfd836e29124b2dd3558 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 19 Oct 2016 23:40:45 +0200 Subject: have refs in d.ts file instead of .ts file --- lib/wallet/wallet.ts | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'lib/wallet') 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; } -- cgit v1.2.3