aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-09-07 05:37:46 +0800
committerDan Finlay <dan@danfinlay.com>2017-09-07 05:37:46 +0800
commit74f7fc4613d136b57a4395d273ce4bf52d6685db (patch)
treec5b718502b394c58239fc4821aab343f059851a9 /app/scripts
parentf9a052deed8749a1c6dd544df561967a568749d9 (diff)
downloadtangerine-wallet-browser-74f7fc4613d136b57a4395d273ce4bf52d6685db.tar
tangerine-wallet-browser-74f7fc4613d136b57a4395d273ce4bf52d6685db.tar.gz
tangerine-wallet-browser-74f7fc4613d136b57a4395d273ce4bf52d6685db.tar.bz2
tangerine-wallet-browser-74f7fc4613d136b57a4395d273ce4bf52d6685db.tar.lz
tangerine-wallet-browser-74f7fc4613d136b57a4395d273ce4bf52d6685db.tar.xz
tangerine-wallet-browser-74f7fc4613d136b57a4395d273ce4bf52d6685db.tar.zst
tangerine-wallet-browser-74f7fc4613d136b57a4395d273ce4bf52d6685db.zip
Check balances in parallel
Diffstat (limited to 'app/scripts')
-rw-r--r--app/scripts/lib/pending-balance-calculator.js9
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
}