diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-10-19 23:40:45 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-10-19 23:40:45 +0200 |
commit | 9ccc6626acf66ab4d938bfd836e29124b2dd3558 (patch) | |
tree | e2ed566ed32eb9f53b2221733b3277a254225b4d /lib/wallet/wallet.ts | |
parent | 67e0e02ee071e9e20466b93f69ac25db0c2a88fc (diff) | |
download | wallet-core-9ccc6626acf66ab4d938bfd836e29124b2dd3558.tar.xz |
have refs in d.ts file instead of .ts file
Diffstat (limited to 'lib/wallet/wallet.ts')
-rw-r--r-- | lib/wallet/wallet.ts | 26 |
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; } |