1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Check balances in parallel

This commit is contained in:
Dan Finlay 2017-09-06 14:37:46 -07:00
parent f9a052deed
commit 74f7fc4613

View File

@ -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
}