aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/redux
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-17 00:51:41 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-17 00:51:41 +0800
commit37d60dc39ea6476c3185e124175cb02d5e830250 (patch)
treede83087e501b5c9b236658ac65f13825ae070315 /packages/instant/src/redux
parented26f5af985239e0dd91b68d4ec0aa264267acd6 (diff)
downloaddexon-sol-tools-37d60dc39ea6476c3185e124175cb02d5e830250.tar
dexon-sol-tools-37d60dc39ea6476c3185e124175cb02d5e830250.tar.gz
dexon-sol-tools-37d60dc39ea6476c3185e124175cb02d5e830250.tar.bz2
dexon-sol-tools-37d60dc39ea6476c3185e124175cb02d5e830250.tar.lz
dexon-sol-tools-37d60dc39ea6476c3185e124175cb02d5e830250.tar.xz
dexon-sol-tools-37d60dc39ea6476c3185e124175cb02d5e830250.tar.zst
dexon-sol-tools-37d60dc39ea6476c3185e124175cb02d5e830250.zip
Typesafe analytic actions
Diffstat (limited to 'packages/instant/src/redux')
-rw-r--r--packages/instant/src/redux/analytics_middleware.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/instant/src/redux/analytics_middleware.ts b/packages/instant/src/redux/analytics_middleware.ts
index eddeeb193..81031eb29 100644
--- a/packages/instant/src/redux/analytics_middleware.ts
+++ b/packages/instant/src/redux/analytics_middleware.ts
@@ -21,10 +21,12 @@ export const analyticsMiddleware: Middleware = store => next => middlewareAction
switch (nextAction.type) {
case ActionTypes.SET_ACCOUNT_STATE_READY:
- if (curAccount.state === AccountState.Ready && !_.isEqual(curAccount, prevAccount)) {
+ if (curAccount.state === AccountState.Ready && prevAccount.state !== AccountState.Ready) {
const ethAddress = curAccount.address;
analytics.addUserProperties({ ethAddress });
- analytics.track('Wallet - Ready');
+ analytics.walletReady({
+ numAssetsAvailable: curState.availableAssets ? curState.availableAssets.length : 0,
+ });
}
break;
case ActionTypes.UPDATE_ACCOUNT_ETH_BALANCE: