aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/util/heartbeater_factory.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/instant/src/util/heartbeater_factory.ts')
-rw-r--r--packages/instant/src/util/heartbeater_factory.ts11
1 files changed, 5 insertions, 6 deletions
diff --git a/packages/instant/src/util/heartbeater_factory.ts b/packages/instant/src/util/heartbeater_factory.ts
index 9fac9cf4c..beedb66c8 100644
--- a/packages/instant/src/util/heartbeater_factory.ts
+++ b/packages/instant/src/util/heartbeater_factory.ts
@@ -1,17 +1,16 @@
import { asyncData } from '../redux/async_data';
import { Store } from '../redux/store';
-import { updateBuyQuoteOrFlashErrorAsyncForState } from './buy_quote_fetcher';
import { Heartbeater } from './heartbeater';
-export const generateAccountHeartbeater = (store: Store): Heartbeater => {
+export const generateAccountHeartbeater = (store: Store, performImmediatelyOnStart: boolean): Heartbeater => {
return new Heartbeater(async () => {
await asyncData.fetchAccountInfoAndDispatchToStore(store, { setLoading: false });
- });
+ }, performImmediatelyOnStart);
};
-export const generateBuyQuoteHeartbeater = (store: Store): Heartbeater => {
+export const generateBuyQuoteHeartbeater = (store: Store, performImmediatelyOnStart: boolean): Heartbeater => {
return new Heartbeater(async () => {
- await updateBuyQuoteOrFlashErrorAsyncForState(store.getState(), store.dispatch);
- });
+ await asyncData.fetchCurrentBuyQuoteAndDispatchToStore(store, false);
+ }, performImmediatelyOnStart);
};