aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/redux
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-09 06:57:39 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-09 06:57:39 +0800
commit7acaae37a969339d1b4971f80d7fd842266bb60b (patch)
tree08925eec8cc75c525d4a384383383cc07d75f77c /packages/instant/src/redux
parentc84e163edb329b478749cad09f222cc12e3698fe (diff)
downloaddexon-sol-tools-7acaae37a969339d1b4971f80d7fd842266bb60b.tar.gz
dexon-sol-tools-7acaae37a969339d1b4971f80d7fd842266bb60b.tar.zst
dexon-sol-tools-7acaae37a969339d1b4971f80d7fd842266bb60b.zip
feat(instant): Heartbeat for updating account info
Diffstat (limited to 'packages/instant/src/redux')
-rw-r--r--packages/instant/src/redux/async_data.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/instant/src/redux/async_data.ts b/packages/instant/src/redux/async_data.ts
index 862f60e78..055d3de20 100644
--- a/packages/instant/src/redux/async_data.ts
+++ b/packages/instant/src/redux/async_data.ts
@@ -34,10 +34,10 @@ export const asyncData = {
store.dispatch(actions.setAvailableAssets([]));
}
},
- fetchAccountInfoAndDispatchToStore: async (store: Store) => {
+ fetchAccountInfoAndDispatchToStore: async (store: Store, options = { setLoading: true }) => {
const { providerState } = store.getState();
const web3Wrapper = providerState.web3Wrapper;
- if (providerState.account.state !== AccountState.Loading) {
+ if (options.setLoading && providerState.account.state !== AccountState.Loading) {
store.dispatch(actions.setAccountStateLoading());
}
let availableAddresses: string[];