aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-11-22 05:40:23 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-11-22 05:52:55 +0800
commit804de89796de047fe43dbb736b5e8b82bb30ee3a (patch)
tree5662046dedd74d434cd40f779fc7dfc1bd4b66eb /packages/instant/src
parent6604e2db20d6263e05b00cf5d36b56788e42d9c2 (diff)
downloaddexon-sol-tools-804de89796de047fe43dbb736b5e8b82bb30ee3a.tar
dexon-sol-tools-804de89796de047fe43dbb736b5e8b82bb30ee3a.tar.gz
dexon-sol-tools-804de89796de047fe43dbb736b5e8b82bb30ee3a.tar.bz2
dexon-sol-tools-804de89796de047fe43dbb736b5e8b82bb30ee3a.tar.lz
dexon-sol-tools-804de89796de047fe43dbb736b5e8b82bb30ee3a.tar.xz
dexon-sol-tools-804de89796de047fe43dbb736b5e8b82bb30ee3a.tar.zst
dexon-sol-tools-804de89796de047fe43dbb736b5e8b82bb30ee3a.zip
chore(instant): revert usage of event properties
Diffstat (limited to 'packages/instant/src')
-rw-r--r--packages/instant/src/redux/analytics_middleware.ts4
-rw-r--r--packages/instant/src/util/analytics.ts13
2 files changed, 5 insertions, 12 deletions
diff --git a/packages/instant/src/redux/analytics_middleware.ts b/packages/instant/src/redux/analytics_middleware.ts
index 931902187..299c2560e 100644
--- a/packages/instant/src/redux/analytics_middleware.ts
+++ b/packages/instant/src/redux/analytics_middleware.ts
@@ -27,10 +27,10 @@ export const analyticsMiddleware: Middleware = store => next => middlewareAction
prevAccount.state === AccountState.Ready && prevAccount.address !== curAccount.address;
const ethAddress = curAccount.address;
if (didJustTurnReady) {
- analytics.trackAccountReady({ address: ethAddress });
+ analytics.trackAccountReady(ethAddress);
analytics.addUserProperties({ lastKnownEthAddress: ethAddress });
} else if (didJustUpdateAddress) {
- analytics.trackAccountAddressChanged({ address: ethAddress });
+ analytics.trackAccountAddressChanged(ethAddress);
analytics.addUserProperties({ lastKnownEthAddress: ethAddress });
}
}
diff --git a/packages/instant/src/util/analytics.ts b/packages/instant/src/util/analytics.ts
index 31233fe7a..e389e1530 100644
--- a/packages/instant/src/util/analytics.ts
+++ b/packages/instant/src/util/analytics.ts
@@ -48,12 +48,6 @@ export interface AnalyticsEventOptions {
gitSha?: string;
npmVersion?: string;
}
-export interface AccountReadyEventProperties {
- address: string;
-}
-export interface AccountAddressChangedEventProperties {
- address: string;
-}
export const analytics = {
addUserProperties: (properties: AnalyticsUserOptions): void => {
@@ -68,10 +62,9 @@ export const analytics = {
},
trackInstantOpened: trackingEventFnWithoutPayload(EventNames.INSTANT_OPENED),
trackAccountLocked: trackingEventFnWithoutPayload(EventNames.ACCOUNT_LOCKED),
- trackAccountReady: (eventProperties: AccountReadyEventProperties) =>
- trackingEventFnWithPayload(EventNames.ACCOUNT_READY)({ ...eventProperties }),
+ trackAccountReady: (address: string) => trackingEventFnWithPayload(EventNames.ACCOUNT_READY)({ address }),
trackAccountUnlockRequested: trackingEventFnWithoutPayload(EventNames.ACCOUNT_UNLOCK_REQUESTED),
trackAccountUnlockDenied: trackingEventFnWithoutPayload(EventNames.ACCOUNT_UNLOCK_DENIED),
- trackAccountAddressChanged: (eventProperties: AccountAddressChangedEventProperties) =>
- trackingEventFnWithPayload(EventNames.ACCOUNT_ADDRESS_CHANGED)({ ...eventProperties }),
+ trackAccountAddressChanged: (address: string) =>
+ trackingEventFnWithPayload(EventNames.ACCOUNT_ADDRESS_CHANGED)({ address }),
};