aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/redux/analytics_middleware.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/instant/src/redux/analytics_middleware.ts')
-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: