diff options
author | Hsuan Lee <hsuan@cobinhood.com> | 2019-01-19 18:42:04 +0800 |
---|---|---|
committer | Hsuan Lee <hsuan@cobinhood.com> | 2019-01-19 18:42:04 +0800 |
commit | 7ae38906926dc09bc10670c361af0d2bf0050426 (patch) | |
tree | 5fb10ae366b987db09e4ddb4bc3ba0f75404ad08 /packages/website/ts/redux/analyticsMiddleware.ts | |
parent | b5fd3c72a08aaa6957917d74c333387a16edf66b (diff) | |
download | dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.gz dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.zst dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.zip |
Update dependency packages
Diffstat (limited to 'packages/website/ts/redux/analyticsMiddleware.ts')
-rw-r--r-- | packages/website/ts/redux/analyticsMiddleware.ts | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/packages/website/ts/redux/analyticsMiddleware.ts b/packages/website/ts/redux/analyticsMiddleware.ts deleted file mode 100644 index 51d39a5d7..000000000 --- a/packages/website/ts/redux/analyticsMiddleware.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Middleware } from 'redux'; -import { State } from 'ts/redux/reducer'; -import { ActionTypes } from 'ts/types'; -import { analytics } from 'ts/utils/analytics'; - -export const analyticsMiddleware: Middleware = store => next => action => { - const nextAction = next(action); - const nextState = (store.getState() as any) as State; - switch (action.type) { - case ActionTypes.UpdateInjectedProviderName: - analytics.addEventProperties({ - injectedProviderName: nextState.injectedProviderName, - }); - break; - case ActionTypes.UpdateNetworkId: - analytics.addEventProperties({ - networkId: nextState.networkId, - }); - break; - case ActionTypes.UpdateUserAddress: - analytics.addUserProperties({ - ethAddress: nextState.userAddress, - }); - break; - case ActionTypes.UpdateUserEtherBalance: - if (nextState.userEtherBalanceInWei) { - analytics.addUserProperties({ - ethBalance: nextState.userEtherBalanceInWei.toString(), - }); - } - break; - default: - break; - } - return nextAction; -}; |