Skip to content

Commit

Permalink
fix: counterfactual safe tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
schmanu committed May 30, 2024
1 parent d5f5adb commit 5362ee8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/welcome/MyAccounts/useTrackedSafesCount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ const useTrackSafesCount = (
}, [wallet?.address])

useEffect(() => {
if (!isOwnedSafesTracked && ownedSafes && ownedSafes.length > 0 && isLoginPage) {
if (wallet && !isOwnedSafesTracked && ownedSafes && ownedSafes.length > 0 && isLoginPage) {
trackEvent({ ...OVERVIEW_EVENTS.TOTAL_SAFES_OWNED, label: ownedSafes.length })
isOwnedSafesTracked = true
}
}, [isLoginPage, ownedSafes])
}, [isLoginPage, ownedSafes, wallet])

useEffect(() => {
if (watchlistSafes && isLoginPage && watchlistSafes.length > 0 && !isWatchlistTracked) {
Expand Down

0 comments on commit 5362ee8

Please sign in to comment.