diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-09 06:57:39 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-09 06:57:39 +0800 |
commit | 7acaae37a969339d1b4971f80d7fd842266bb60b (patch) | |
tree | 08925eec8cc75c525d4a384383383cc07d75f77c /packages/instant/src/redux | |
parent | c84e163edb329b478749cad09f222cc12e3698fe (diff) | |
download | dexon-sol-tools-7acaae37a969339d1b4971f80d7fd842266bb60b.tar dexon-sol-tools-7acaae37a969339d1b4971f80d7fd842266bb60b.tar.gz dexon-sol-tools-7acaae37a969339d1b4971f80d7fd842266bb60b.tar.bz2 dexon-sol-tools-7acaae37a969339d1b4971f80d7fd842266bb60b.tar.lz dexon-sol-tools-7acaae37a969339d1b4971f80d7fd842266bb60b.tar.xz 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.ts | 4 |
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[]; |