From 565a1b510e91b8cfae323844464a9a08e6d92a18 Mon Sep 17 00:00:00 2001 From: Jannis Redmann Date: Tue, 3 Jan 2017 17:42:05 +0100 Subject: [PATCH] refresh balances of contacts & contracts when syncing (#4022) --- js/src/redux/providers/balancesActions.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/src/redux/providers/balancesActions.js b/js/src/redux/providers/balancesActions.js index b99c44fcb..d90cab678 100644 --- a/js/src/redux/providers/balancesActions.js +++ b/js/src/redux/providers/balancesActions.js @@ -173,14 +173,15 @@ export function fetchTokens (_tokenIds) { export function fetchBalances (_addresses) { return (dispatch, getState) => { const { api, personal } = getState(); - const { visibleAccounts, accounts } = personal; + const { visibleAccounts, accountsInfo } = personal; - const addresses = uniq((_addresses || visibleAccounts || []).concat(Object.keys(accounts))); + const addresses = uniq((_addresses || visibleAccounts || []).concat(Object.keys(accountsInfo))); if (addresses.length === 0) { return Promise.resolve(); } + // With only a single account, more info will be displayed. const fullFetch = addresses.length === 1; const addressesToFetch = uniq(addresses);