diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-07-13 07:57:03 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-07-13 07:57:03 +0800 |
commit | 1df074b73e05adf669b0cedc4bb1473e9e5631db (patch) | |
tree | e32cb0adcfcc5df9b7d2b562cfa17cdd86003567 /packages/website/ts/redux | |
parent | 0941e0a929f2fe3ef6d0cf1de5a1274f5f45f031 (diff) | |
download | dexon-sol-tools-1df074b73e05adf669b0cedc4bb1473e9e5631db.tar dexon-sol-tools-1df074b73e05adf669b0cedc4bb1473e9e5631db.tar.gz dexon-sol-tools-1df074b73e05adf669b0cedc4bb1473e9e5631db.tar.bz2 dexon-sol-tools-1df074b73e05adf669b0cedc4bb1473e9e5631db.tar.lz dexon-sol-tools-1df074b73e05adf669b0cedc4bb1473e9e5631db.tar.xz dexon-sol-tools-1df074b73e05adf669b0cedc4bb1473e9e5631db.tar.zst dexon-sol-tools-1df074b73e05adf669b0cedc4bb1473e9e5631db.zip |
Make Analytics API non-async
Diffstat (limited to 'packages/website/ts/redux')
-rw-r--r-- | packages/website/ts/redux/analyticsMiddleware.ts | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/packages/website/ts/redux/analyticsMiddleware.ts b/packages/website/ts/redux/analyticsMiddleware.ts index e848ca3fd..1ef9b6ad7 100644 --- a/packages/website/ts/redux/analyticsMiddleware.ts +++ b/packages/website/ts/redux/analyticsMiddleware.ts @@ -8,34 +8,29 @@ export const analyticsMiddleware: Middleware = store => next => action => { const nextState = (store.getState() as any) as State; switch (action.type) { case ActionTypes.UpdateInjectedProviderName: - // tslint:disable-next-line:no-floating-promises - analytics.addEventPropertiesAsync({ + analytics.addEventProperties({ injectedProviderName: nextState.injectedProviderName, }); break; case ActionTypes.UpdateNetworkId: - // tslint:disable-next-line:no-floating-promises - analytics.addEventPropertiesAsync({ + analytics.addEventProperties({ networkId: nextState.networkId, }); break; case ActionTypes.UpdateUserAddress: - // tslint:disable-next-line:no-floating-promises - analytics.addUserPropertiesAsync({ + analytics.addUserProperties({ ethAddress: nextState.userAddress, }); break; case ActionTypes.UpdateUserEtherBalance: if (nextState.userEtherBalanceInWei) { - // tslint:disable-next-line:no-floating-promises - analytics.addUserPropertiesAsync({ + analytics.addUserProperties({ ethBalance: nextState.userEtherBalanceInWei.toString(), }); } break; case ActionTypes.UpdatePortalOnboardingStep: - // tslint:disable-next-line:no-floating-promises - analytics.trackAsync('Update Onboarding Step', { + analytics.track('Update Onboarding Step', { stepIndex: nextState.portalOnboardingStep, }); break; |