Skip to content

Commit

Permalink
Merge pull request #3118 from near/rudderstack-bug-fix
Browse files Browse the repository at this point in the history
Minor bug fix on rudderstack
  • Loading branch information
hcho112 authored Jan 23, 2024
2 parents c1a23ce + a83b900 commit 8a5e4dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ const WalletMigration = ({ open, onClose }) => {

const handleSetActiveView = useCallback((activeView) => {
handleStateUpdate({ activeView });
recordWalletMigrationEvent(activeView);
if (activeView) {
recordWalletMigrationEvent(activeView);
}
}, [handleStateUpdate]);


Expand Down
4 changes: 0 additions & 4 deletions packages/frontend/src/components/wallet-migration/metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ export const initAnalytics = () => {
};

export const recordWalletMigrationEvent = (eventLabel, properties = {}) => {
if (!rudderAnalyticsReady) {
return;
}

try {
const accountId = localStorage.getItem(KEY_ACTIVE_ACCOUNT_ID);
const hashId = accountIdToHash(accountId);
Expand Down

0 comments on commit 8a5e4dd

Please sign in to comment.