aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/redux/async_data.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/instant/src/redux/async_data.ts')
-rw-r--r--packages/instant/src/redux/async_data.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/instant/src/redux/async_data.ts b/packages/instant/src/redux/async_data.ts
index bff9d8814..a8f632009 100644
--- a/packages/instant/src/redux/async_data.ts
+++ b/packages/instant/src/redux/async_data.ts
@@ -52,7 +52,8 @@ export const asyncData = {
if (!_.isEmpty(availableAddresses)) {
const activeAddress = availableAddresses[0];
store.dispatch(actions.setAccountStateReady(activeAddress));
- await asyncData.fetchAccountBalanceAndDispatchToStore(store);
+ // tslint:disable-next-line:no-floating-promises
+ asyncData.fetchAccountBalanceAndDispatchToStore(store);
} else {
store.dispatch(actions.setAccountStateLocked());
}
@@ -65,8 +66,9 @@ export const asyncData = {
return;
}
try {
- const ethBalanceInWei = await web3Wrapper.getBalanceInWeiAsync(account.address);
- store.dispatch(actions.updateAccountEthBalance(ethBalanceInWei));
+ const address = account.address;
+ const ethBalanceInWei = await web3Wrapper.getBalanceInWeiAsync(address);
+ store.dispatch(actions.updateAccountEthBalance({ address, ethBalanceInWei }));
} catch (e) {
// leave balance as is
return;