chore(instant): revert usage of event properties
This commit is contained in:
		@@ -27,10 +27,10 @@ export const analyticsMiddleware: Middleware = store => next => middlewareAction
 | 
				
			|||||||
                    prevAccount.state === AccountState.Ready && prevAccount.address !== curAccount.address;
 | 
					                    prevAccount.state === AccountState.Ready && prevAccount.address !== curAccount.address;
 | 
				
			||||||
                const ethAddress = curAccount.address;
 | 
					                const ethAddress = curAccount.address;
 | 
				
			||||||
                if (didJustTurnReady) {
 | 
					                if (didJustTurnReady) {
 | 
				
			||||||
                    analytics.trackAccountReady({ address: ethAddress });
 | 
					                    analytics.trackAccountReady(ethAddress);
 | 
				
			||||||
                    analytics.addUserProperties({ lastKnownEthAddress: ethAddress });
 | 
					                    analytics.addUserProperties({ lastKnownEthAddress: ethAddress });
 | 
				
			||||||
                } else if (didJustUpdateAddress) {
 | 
					                } else if (didJustUpdateAddress) {
 | 
				
			||||||
                    analytics.trackAccountAddressChanged({ address: ethAddress });
 | 
					                    analytics.trackAccountAddressChanged(ethAddress);
 | 
				
			||||||
                    analytics.addUserProperties({ lastKnownEthAddress: ethAddress });
 | 
					                    analytics.addUserProperties({ lastKnownEthAddress: ethAddress });
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -48,12 +48,6 @@ export interface AnalyticsEventOptions {
 | 
				
			|||||||
    gitSha?: string;
 | 
					    gitSha?: string;
 | 
				
			||||||
    npmVersion?: string;
 | 
					    npmVersion?: string;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
export interface AccountReadyEventProperties {
 | 
					 | 
				
			||||||
    address: string;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
export interface AccountAddressChangedEventProperties {
 | 
					 | 
				
			||||||
    address: string;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const analytics = {
 | 
					export const analytics = {
 | 
				
			||||||
    addUserProperties: (properties: AnalyticsUserOptions): void => {
 | 
					    addUserProperties: (properties: AnalyticsUserOptions): void => {
 | 
				
			||||||
@@ -68,10 +62,9 @@ export const analytics = {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    trackInstantOpened: trackingEventFnWithoutPayload(EventNames.INSTANT_OPENED),
 | 
					    trackInstantOpened: trackingEventFnWithoutPayload(EventNames.INSTANT_OPENED),
 | 
				
			||||||
    trackAccountLocked: trackingEventFnWithoutPayload(EventNames.ACCOUNT_LOCKED),
 | 
					    trackAccountLocked: trackingEventFnWithoutPayload(EventNames.ACCOUNT_LOCKED),
 | 
				
			||||||
    trackAccountReady: (eventProperties: AccountReadyEventProperties) =>
 | 
					    trackAccountReady: (address: string) => trackingEventFnWithPayload(EventNames.ACCOUNT_READY)({ address }),
 | 
				
			||||||
        trackingEventFnWithPayload(EventNames.ACCOUNT_READY)({ ...eventProperties }),
 | 
					 | 
				
			||||||
    trackAccountUnlockRequested: trackingEventFnWithoutPayload(EventNames.ACCOUNT_UNLOCK_REQUESTED),
 | 
					    trackAccountUnlockRequested: trackingEventFnWithoutPayload(EventNames.ACCOUNT_UNLOCK_REQUESTED),
 | 
				
			||||||
    trackAccountUnlockDenied: trackingEventFnWithoutPayload(EventNames.ACCOUNT_UNLOCK_DENIED),
 | 
					    trackAccountUnlockDenied: trackingEventFnWithoutPayload(EventNames.ACCOUNT_UNLOCK_DENIED),
 | 
				
			||||||
    trackAccountAddressChanged: (eventProperties: AccountAddressChangedEventProperties) =>
 | 
					    trackAccountAddressChanged: (address: string) =>
 | 
				
			||||||
        trackingEventFnWithPayload(EventNames.ACCOUNT_ADDRESS_CHANGED)({ ...eventProperties }),
 | 
					        trackingEventFnWithPayload(EventNames.ACCOUNT_ADDRESS_CHANGED)({ address }),
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user