Skip to content

Commit f9d99c0

Browse files
authored
fix: MUSD-1027 rewire onboarding feature flag to skip money onboarding if crashing occurs cp-8.0.0 (#32112)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until this PR meets the canonical Definition of Ready For Review in `docs/readme/ready-for-review.md`. In short: the template must be materially complete (not just section titles present), all status checks must be currently passing, and the only expected follow-up commits must be reviewer-driven. --> <!-- mms-check directive vocabulary — read by .github/scripts/shared/pr-template-checks.ts at module load to build the validation plan. Directives are invisible in rendered markdown and must NOT be removed or edited without updating the validator registry. type=text Section must contain non-placeholder prose. type=changelog Section must have a valid CHANGELOG entry: line. type=issue-link Section must have a Fixes:/Closes:/Refs: line with a value. type=manual-testing Section must have real testing steps or an explicit N/A. type=screenshot Section must have evidence (image/URL) or an explicit N/A. type=checklist Section must have all checkboxes consciously checked. required=true|false Whether a missing/invalid section runs the validator at all. blocking=true|false Whether a failure of this check fails the CI workflow. Default: false — failures are shown as warnings in the sticky comment but do not block the PR. Sections without a directive are checked for structural presence only. --> ## **Description** Fixes regression where Money onboarding flow was rendered even when onboarding flag was disabled. <!-- mms-check: type=text required=true --> <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- mms-check: type=changelog required=true blocking=true --> <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: fixes regression where Money onboarding flow was rendered even when onboarding flag was disabled. ## **Related issues** <!-- mms-check: type=issue-link required=true --> Fixes: [MUSD-1027: Rewire onboarding feature flag to skip in prod if it causes crashes](https://consensyssoftware.atlassian.net/browse/MUSD-1027) ## **Manual testing steps** <!-- mms-check: type=manual-testing required=true --> ```gherkin Feature: Money onboarding rendering based on feature flag Scenario: first time user skips onboarding Given user hasn't seen onboarding and flag is disabled When user click Money tab or MoneyBalanceCard Then onboarding is skipped and user is redirected to Money Home ``` ## **Screenshots/Recordings** <!-- mms-check: type=screenshot required=true --> <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> N/A - was broken before ### **After** <!-- [screenshots/recordings] --> N/A - No UI difference; conditional redirect based on feature flag ## **Pre-merge author checklist** <!-- mms-check: type=checklist required=true --> <!-- Every checklist item must be consciously assessed before marking this PR as "Ready for review". A checked box means you deliberately considered that responsibility, not that you literally performed every action listed. Unchecked boxes are ambiguous: they are not an implicit "N/A" and they are not a silent "skip". See `docs/readme/ready-for-review.md` for the full checklist semantics. --> - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. #### Performance checks (if applicable) - [x] I've tested on Android - Ideally on a mid-range device; emulator is acceptable - [x] I've tested with a power user scenario - Use these [power-user SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93) to import wallets with many accounts and tokens - [x] I've instrumented key operations with Sentry traces for production performance metrics - See [`trace()`](/app/util/trace.ts) for usage and [`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274) for an example For performance guidelines and tooling, see the [Performance Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers). ## **Pre-merge reviewer checklist** <!-- Reviewer checklist items follow the same semantics as the author checklist: an unchecked box is ambiguous, a checked box means the reviewer consciously assessed that responsibility. See `docs/readme/ready-for-review.md`. --> - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches multiple user entry paths (tab, card, deeplinks, navigation) and analytics; behavior change for users who have not seen onboarding when the flag is off, but scoped to Money flows with broad test coverage. > > **Overview** > **Money onboarding is now gated by `selectMoneyOnboardingStepperAnimationEnabled`**, not only by whether the user has seen onboarding. When the flag is off, first-time users are treated like returning users: navigation goes to Money Home, Add starts deposit, and analytics use home/deposit targets instead of onboarding. > > This is applied consistently across **balance card**, **Money tab press tracking**, **`useMoneyNavigation`**, **money deeplinks** (`handleMoney`), and **developer options** (displays the flag state). Tests are updated for the new branches. > > The balance card **drops the separate “new user” container** (`NEW_USER_CONTAINER` test ID and `isNewUser` logic); empty zero-balance states always use the empty container. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 30115e7. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 9adacea commit f9d99c0

11 files changed

Lines changed: 258 additions & 50 deletions

File tree

app/components/UI/Money/components/MoneyBalanceCard/MoneyBalanceCard.test.tsx

Lines changed: 58 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import useMoneyAccountBalance from '../../hooks/useMoneyAccountBalance';
1010
import useMoneyAccountInfo from '../../hooks/useMoneyAccountInfo';
1111
import { selectMoneyOnboardingSeen } from '../../../../../reducers/user/selectors';
1212
import { selectShouldShowWalletHomeOnboardingSteps } from '../../../../../selectors/onboarding';
13+
import { selectMoneyOnboardingStepperAnimationEnabled } from '../../../../../selectors/featureFlagController/moneyAccount';
1314
import { useMoneyNavigation } from '../../hooks/useMoneyNavigation';
1415
import { useMoneyAccountDeposit } from '../../hooks/useMoneyAccount';
1516
import { useMoneyAnalytics } from '../../hooks/useMoneyAnalytics';
@@ -75,6 +76,14 @@ jest.mock('../../../../../selectors/onboarding', () => ({
7576
selectShouldShowWalletHomeOnboardingSteps: jest.fn(),
7677
}));
7778

79+
jest.mock(
80+
'../../../../../selectors/featureFlagController/moneyAccount',
81+
() => ({
82+
__esModule: true,
83+
selectMoneyOnboardingStepperAnimationEnabled: jest.fn(),
84+
}),
85+
);
86+
7887
jest.mock('../../../../../util/Logger', () => ({
7988
__esModule: true,
8089
default: { error: jest.fn() },
@@ -86,6 +95,9 @@ const mockSelectMoneyOnboardingSeen = jest.mocked(selectMoneyOnboardingSeen);
8695
const mockSelectShouldShowWalletHomeOnboardingSteps = jest.mocked(
8796
selectShouldShowWalletHomeOnboardingSteps,
8897
);
98+
const mockSelectMoneyOnboardingStepperAnimationEnabled = jest.mocked(
99+
selectMoneyOnboardingStepperAnimationEnabled,
100+
);
89101
const mockUseMoneyNavigation = jest.mocked(useMoneyNavigation);
90102
const mockUseMoneyAccountDeposit = jest.mocked(useMoneyAccountDeposit);
91103

@@ -136,6 +148,7 @@ describe('MoneyBalanceCard', () => {
136148
mockUseMoneyAccountInfo.mockReturnValue(createInfoMock());
137149
mockSelectMoneyOnboardingSeen.mockReturnValue(true);
138150
mockSelectShouldShowWalletHomeOnboardingSteps.mockReturnValue(false);
151+
mockSelectMoneyOnboardingStepperAnimationEnabled.mockReturnValue(true);
139152
mockUseMoneyNavigation.mockReturnValue({
140153
navigateToMoneyHome: mockNavigateToMoneyHome,
141154
});
@@ -197,15 +210,12 @@ describe('MoneyBalanceCard', () => {
197210
);
198211
});
199212

200-
it('does not render the empty or new-user container', () => {
213+
it('does not render the empty container', () => {
201214
const { queryByTestId } = renderWithProvider(<MoneyBalanceCard />);
202215

203216
expect(
204217
queryByTestId(MoneyBalanceCardTestIds.EMPTY_CONTAINER),
205218
).not.toBeOnTheScreen();
206-
expect(
207-
queryByTestId(MoneyBalanceCardTestIds.NEW_USER_CONTAINER),
208-
).not.toBeOnTheScreen();
209219
});
210220

211221
it('does not render a retry button (distinct from error kind)', () => {
@@ -334,14 +344,6 @@ describe('MoneyBalanceCard', () => {
334344
mockSelectMoneyOnboardingSeen.mockReturnValue(false);
335345
});
336346

337-
it('renders the new-user container testID', () => {
338-
const { getByTestId } = renderWithProvider(<MoneyBalanceCard />);
339-
340-
expect(
341-
getByTestId(MoneyBalanceCardTestIds.NEW_USER_CONTAINER),
342-
).toBeOnTheScreen();
343-
});
344-
345347
it('renders the Add button', () => {
346348
const { getByTestId } = renderWithProvider(<MoneyBalanceCard />);
347349

@@ -365,14 +367,6 @@ describe('MoneyBalanceCard', () => {
365367
queryByTestId(MoneyBalanceCardTestIds.GET_STARTED_BUTTON),
366368
).not.toBeOnTheScreen();
367369
});
368-
369-
it('still renders the new-user container', () => {
370-
const { getByTestId } = renderWithProvider(<MoneyBalanceCard />);
371-
372-
expect(
373-
getByTestId(MoneyBalanceCardTestIds.NEW_USER_CONTAINER),
374-
).toBeOnTheScreen();
375-
});
376370
});
377371

378372
describe('when the wallet-home onboarding stepper is displayed', () => {
@@ -392,14 +386,6 @@ describe('MoneyBalanceCard', () => {
392386
queryByTestId(MoneyBalanceCardTestIds.GET_STARTED_BUTTON),
393387
).not.toBeOnTheScreen();
394388
});
395-
396-
it('still renders the new-user container', () => {
397-
const { getByTestId } = renderWithProvider(<MoneyBalanceCard />);
398-
399-
expect(
400-
getByTestId(MoneyBalanceCardTestIds.NEW_USER_CONTAINER),
401-
).toBeOnTheScreen();
402-
});
403389
});
404390
});
405391

@@ -461,7 +447,7 @@ describe('MoneyBalanceCard', () => {
461447
});
462448
});
463449

464-
describe('when onboarding has been seen', () => {
450+
describe('when onboarding has been seen and onboarding flag is enabled', () => {
465451
it('initiates deposit when Add is pressed', () => {
466452
const { getByTestId } = renderWithProvider(<MoneyBalanceCard />);
467453

@@ -471,6 +457,22 @@ describe('MoneyBalanceCard', () => {
471457
expect(mockNavigate).not.toHaveBeenCalledWith(Routes.MONEY.ONBOARDING);
472458
});
473459
});
460+
461+
describe('when onboarding flag is disabled', () => {
462+
beforeEach(() => {
463+
mockSelectMoneyOnboardingStepperAnimationEnabled.mockReturnValue(false);
464+
mockSelectMoneyOnboardingSeen.mockReturnValue(false);
465+
});
466+
467+
it('initiates deposit when Add is pressed even if onboarding not seen', () => {
468+
const { getByTestId } = renderWithProvider(<MoneyBalanceCard />);
469+
470+
fireEvent.press(getByTestId(MoneyBalanceCardTestIds.ADD_BUTTON));
471+
472+
expect(mockInitiateDeposit).toHaveBeenCalled();
473+
expect(mockNavigate).not.toHaveBeenCalledWith(Routes.MONEY.ONBOARDING);
474+
});
475+
});
474476
});
475477

476478
describe('navigation', () => {
@@ -900,6 +902,33 @@ describe('MoneyBalanceCard', () => {
900902
});
901903
});
902904

905+
it('calls trackSurfaceClicked with MONEY_HOME redirect when card is pressed, onboarding not seen, and onboarding flag is disabled', () => {
906+
mockSelectMoneyOnboardingSeen.mockReturnValue(false);
907+
mockSelectMoneyOnboardingStepperAnimationEnabled.mockReturnValue(false);
908+
const { getByTestId } = renderWithProvider(<MoneyBalanceCard />);
909+
910+
fireEvent.press(getByTestId(MoneyBalanceCardTestIds.FUNDED_CONTAINER));
911+
912+
expect(mockTrackSurfaceClicked).toHaveBeenCalledWith({
913+
redirect_target: SCREEN_NAMES.MONEY_HOME,
914+
});
915+
});
916+
917+
it('tracks Add click with ADD_MONEY intent when onboarding not seen but onboarding flag is disabled', () => {
918+
mockSelectMoneyOnboardingSeen.mockReturnValue(false);
919+
mockSelectMoneyOnboardingStepperAnimationEnabled.mockReturnValue(false);
920+
const { getByTestId } = renderWithProvider(<MoneyBalanceCard />);
921+
922+
fireEvent.press(getByTestId(MoneyBalanceCardTestIds.ADD_BUTTON));
923+
924+
expect(mockTrackButtonClicked).toHaveBeenCalledWith({
925+
button_type: MONEY_BUTTON_TYPES.TEXT,
926+
button_intent: MONEY_BUTTON_INTENTS.ADD_MONEY,
927+
label_key: 'money.balance_card.add',
928+
redirect_target: SCREEN_NAMES.MONEY_DEPOSIT,
929+
});
930+
});
931+
903932
it('calls trackTooltipClicked with MONEY_BALANCE name and INFO type when the info button is pressed', () => {
904933
const { getByTestId } = renderWithProvider(<MoneyBalanceCard />);
905934

app/components/UI/Money/components/MoneyBalanceCard/MoneyBalanceCard.testIds.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export const MoneyBalanceCardTestIds = {
2-
NEW_USER_CONTAINER: 'money-balance-card-new-user-container',
32
EMPTY_CONTAINER: 'money-balance-card-empty-container',
43
FUNDED_CONTAINER: 'money-balance-card-funded-container',
54
ERROR_CONTAINER: 'money-balance-card-error-container',

app/components/UI/Money/components/MoneyBalanceCard/MoneyBalanceCard.tsx

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import {
4343
MONEY_TOOLTIP_TYPES,
4444
} from '../../constants/moneyEvents';
4545
import { useMoneyAnalytics } from '../../hooks/useMoneyAnalytics';
46+
import { selectMoneyOnboardingStepperAnimationEnabled } from '../../../../../selectors/featureFlagController/moneyAccount';
4647

4748
const MoneyBalanceCard = () => {
4849
const tw = useTailwind();
@@ -63,6 +64,9 @@ const MoneyBalanceCard = () => {
6364
const { navigateToMoneyHome } = useMoneyNavigation();
6465
const { initiateDeposit } = useMoneyAccountDeposit();
6566
const hasSeenMoneyOnboarding = useSelector(selectMoneyOnboardingSeen);
67+
const isOnboardingEnabled = useSelector(
68+
selectMoneyOnboardingStepperAnimationEnabled,
69+
);
6670
const hasOtherPrimaryCtaOnHome = useSelector(
6771
selectShouldShowWalletHomeOnboardingSteps,
6872
);
@@ -96,8 +100,6 @@ const MoneyBalanceCard = () => {
96100
!isUnavailable &&
97101
totalFiatRaw === '0';
98102

99-
const isNewUser = isEmpty && !hasSeenMoneyOnboarding;
100-
101103
const balanceText = totalFiatFormatted ?? '';
102104

103105
const buttonLabelKey = 'money.balance_card.add';
@@ -116,9 +118,7 @@ const MoneyBalanceCard = () => {
116118
buttonVariant = hasOtherPrimaryCtaOnHome
117119
? ButtonVariant.Secondary
118120
: ButtonVariant.Primary;
119-
containerTestId = isNewUser
120-
? MoneyBalanceCardTestIds.NEW_USER_CONTAINER
121-
: MoneyBalanceCardTestIds.EMPTY_CONTAINER;
121+
containerTestId = MoneyBalanceCardTestIds.EMPTY_CONTAINER;
122122
} else {
123123
buttonVariant = hasOtherPrimaryCtaOnHome
124124
? ButtonVariant.Secondary
@@ -136,15 +136,21 @@ const MoneyBalanceCard = () => {
136136

137137
const handleCardPress = useCallback(() => {
138138
trackSurfaceClicked({
139-
redirect_target: hasSeenMoneyOnboarding
140-
? SCREEN_NAMES.MONEY_HOME
141-
: SCREEN_NAMES.MONEY_ONBOARDING,
139+
redirect_target:
140+
hasSeenMoneyOnboarding || !isOnboardingEnabled
141+
? SCREEN_NAMES.MONEY_HOME
142+
: SCREEN_NAMES.MONEY_ONBOARDING,
142143
});
143144
navigateToMoneyHome();
144-
}, [hasSeenMoneyOnboarding, navigateToMoneyHome, trackSurfaceClicked]);
145+
}, [
146+
hasSeenMoneyOnboarding,
147+
isOnboardingEnabled,
148+
navigateToMoneyHome,
149+
trackSurfaceClicked,
150+
]);
145151

146152
const handleAddPress = useCallback(() => {
147-
if (!hasSeenMoneyOnboarding) {
153+
if (!hasSeenMoneyOnboarding && isOnboardingEnabled) {
148154
trackButtonClicked({
149155
button_type: MONEY_BUTTON_TYPES.TEXT,
150156
button_intent: MONEY_BUTTON_INTENTS.GO_TO_MONEY_ONBOARDING,
@@ -168,7 +174,13 @@ const MoneyBalanceCard = () => {
168174
message: '[MoneyBalanceCard] Failed to initiate deposit',
169175
}),
170176
);
171-
}, [hasSeenMoneyOnboarding, initiateDeposit, navigation, trackButtonClicked]);
177+
}, [
178+
hasSeenMoneyOnboarding,
179+
initiateDeposit,
180+
isOnboardingEnabled,
181+
navigation,
182+
trackButtonClicked,
183+
]);
172184

173185
const handleInfoPress = useCallback(() => {
174186
trackTooltipClicked({

app/components/UI/Money/components/MoneyTabPressTracker/MoneyTabPressTracker.test.tsx

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
} from '../../constants/moneyEvents';
1010
import MoneyTabPressTracker from './MoneyTabPressTracker';
1111
import { selectMoneyOnboardingSeen } from '../../../../../reducers/user';
12+
import { selectMoneyOnboardingStepperAnimationEnabled } from '../../../../../selectors/featureFlagController/moneyAccount';
1213

1314
jest.mock('../../../../../core/AppConstants', () => ({
1415
__esModule: true,
@@ -35,6 +36,13 @@ jest.mock('../../../../../reducers/user', () => ({
3536
selectMoneyOnboardingSeen: jest.fn(),
3637
}));
3738

39+
jest.mock(
40+
'../../../../../selectors/featureFlagController/moneyAccount',
41+
() => ({
42+
selectMoneyOnboardingStepperAnimationEnabled: jest.fn(),
43+
}),
44+
);
45+
3846
jest.mock('../../hooks/useMoneyAnalytics', () => ({
3947
useMoneyAnalytics: jest.fn(),
4048
}));
@@ -47,6 +55,8 @@ describe('MoneyTabPressTracker', () => {
4755
});
4856
mockUseSelector.mockImplementation((selector: unknown) => {
4957
if (selector === selectMoneyOnboardingSeen) return true;
58+
if (selector === selectMoneyOnboardingStepperAnimationEnabled)
59+
return true;
5060
return undefined;
5161
});
5262
});
@@ -102,6 +112,8 @@ describe('MoneyTabPressTracker', () => {
102112
beforeEach(() => {
103113
mockUseSelector.mockImplementation((selector: unknown) => {
104114
if (selector === selectMoneyOnboardingSeen) return false;
115+
if (selector === selectMoneyOnboardingStepperAnimationEnabled)
116+
return true;
105117
return undefined;
106118
});
107119
});
@@ -123,4 +135,32 @@ describe('MoneyTabPressTracker', () => {
123135
});
124136
});
125137
});
138+
139+
describe('when onboarding flag is disabled', () => {
140+
beforeEach(() => {
141+
mockUseSelector.mockImplementation((selector: unknown) => {
142+
if (selector === selectMoneyOnboardingSeen) return false;
143+
if (selector === selectMoneyOnboardingStepperAnimationEnabled)
144+
return false;
145+
return undefined;
146+
});
147+
});
148+
149+
it('registered function calls trackButtonClicked with GO_TO_MONEY_HOME intent even when onboarding not seen', () => {
150+
const onRegister = jest.fn();
151+
render(<MoneyTabPressTracker onRegister={onRegister} />);
152+
153+
const registeredFn = onRegister.mock.calls[0][0] as () => void;
154+
act(() => {
155+
registeredFn();
156+
});
157+
158+
expect(mockTrackButtonClicked).toHaveBeenCalledWith({
159+
button_type: MONEY_BUTTON_TYPES.TEXT,
160+
button_intent: MONEY_BUTTON_INTENTS.GO_TO_MONEY_HOME,
161+
label_key: 'bottom_nav.money',
162+
redirect_target: SCREEN_NAMES.MONEY_HOME,
163+
});
164+
});
165+
});
126166
});

app/components/UI/Money/components/MoneyTabPressTracker/MoneyTabPressTracker.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { TabBarIconKey } from '../../../../../component-library/components/Navig
1010
import { useMoneyAnalytics } from '../../hooks/useMoneyAnalytics';
1111
import { selectMoneyOnboardingSeen } from '../../../../../reducers/user';
1212
import { useSelector } from 'react-redux';
13+
import { selectMoneyOnboardingStepperAnimationEnabled } from '../../../../../selectors/featureFlagController/moneyAccount';
1314

1415
/**
1516
* Renders nothing — exists purely to host the Money analytics hook chain so it
@@ -29,13 +30,16 @@ const MoneyTabPressTracker = ({ onRegister }: MoneyTabPressTrackerProps) => {
2930
});
3031

3132
const hasSeenMoneyOnboarding = useSelector(selectMoneyOnboardingSeen);
33+
const isOnboardingEnabled = useSelector(
34+
selectMoneyOnboardingStepperAnimationEnabled,
35+
);
3236

3337
useEffect(() => {
3438
onRegister(() => {
3539
let redirectTarget: SCREEN_NAMES;
3640
let buttonIntent: MONEY_BUTTON_INTENTS;
3741

38-
if (hasSeenMoneyOnboarding) {
42+
if (hasSeenMoneyOnboarding || !isOnboardingEnabled) {
3943
redirectTarget = SCREEN_NAMES.MONEY_HOME;
4044
buttonIntent = MONEY_BUTTON_INTENTS.GO_TO_MONEY_HOME;
4145
} else {
@@ -54,7 +58,12 @@ const MoneyTabPressTracker = ({ onRegister }: MoneyTabPressTrackerProps) => {
5458
return () => {
5559
onRegister(null);
5660
};
57-
}, [trackButtonClicked, onRegister, hasSeenMoneyOnboarding]);
61+
}, [
62+
trackButtonClicked,
63+
onRegister,
64+
hasSeenMoneyOnboarding,
65+
isOnboardingEnabled,
66+
]);
5867

5968
return null;
6069
};

0 commit comments

Comments
 (0)