diff options
author | Dan Finlay <dan@danfinlay.com> | 2017-09-07 05:37:46 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2017-09-07 05:37:46 +0800 |
commit | 74f7fc4613d136b57a4395d273ce4bf52d6685db (patch) | |
tree | c5b718502b394c58239fc4821aab343f059851a9 | |
parent | f9a052deed8749a1c6dd544df561967a568749d9 (diff) | |
download | tangerine-wallet-browser-74f7fc4613d136b57a4395d273ce4bf52d6685db.tar.gz tangerine-wallet-browser-74f7fc4613d136b57a4395d273ce4bf52d6685db.tar.zst tangerine-wallet-browser-74f7fc4613d136b57a4395d273ce4bf52d6685db.zip |
Check balances in parallel
-rw-r--r-- | app/scripts/lib/pending-balance-calculator.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/scripts/lib/pending-balance-calculator.js b/app/scripts/lib/pending-balance-calculator.js index 5b30354a2..4f6e03138 100644 --- a/app/scripts/lib/pending-balance-calculator.js +++ b/app/scripts/lib/pending-balance-calculator.js @@ -9,7 +9,14 @@ class PendingBalanceCalculator { } async getBalance() { - const balance = await this.getBalance + const results = await Promise.all([ + this.getBalance(), + this.getPendingTransactions(), + ]) + + const balance = results[0] + const pending = results[1] + return balance } |