Repository navigation
Commit 59895b9
authored
feat(money): add first-visit splash for the Money account (#47626)
## **Description**
First-time Money users currently land directly on Money home or a
deposit confirmation, with no introduction to the account. This adds a
one-time splash with the Money value proposition, benefits and FAQs,
shown when they first open Money or start a deposit from an Earn CTA.
The Money tab opens it over the current screen and only navigates to
Money home after acknowledgement; the seen flag lives in
`AppStateController` and the FAQ section reuses the existing Money
component.
## **Changelog**
CHANGELOG entry: Added a first-visit Money account splash that
introduces earning, trading, sending, and spending.
## **Related issues**
Fixes:
[MUSD-1504](https://consensyssoftware.atlassian.net/browse/MUSD-1504)
## **Manual testing steps**
1. Build with Money enabled and a geo-eligible wallet, starting from a
state where `moneyFtueSeen` is `false`.
2. Open the popup, side panel and full screen. Click the Money tab and
verify the splash appears over the current screen with a faded
background; in the side panel the card is centered and tall enough to
show the first two benefits.
3. Scroll through the five benefits and the ten FAQs, then press **Start
earning** and verify you land on Money home. Repeat with the X button.
4. Reopen Money, then reload and reopen it. Verify the splash does not
appear either time.
5. Reset `moneyFtueSeen` to `false`, then use an Earn CTA on an eligible
stablecoin row from the wallet home. Verify the splash appears and
**Start earning** / X opens the Add funds confirmation with that token
preselected.
## **Screenshots/Recordings**
### **Before**
Not applicable — new surface.
### **After**
Popup View
<img width="385" height="579" alt="popup_1"
src="https://github.com/user-attachments/assets/377a8784-a348-4161-9087-a2a33972d3de"
/>
<img width="386" height="574" alt="popup_2"
src="https://github.com/user-attachments/assets/eb921b5e-2bfd-4abb-8024-e0e5356403cf"
/>
<img width="382" height="568" alt="popup_3"
src="https://github.com/user-attachments/assets/67e62f16-ce5b-44e5-b0a5-21107baf5b48"
/>
Side Panel View
<img width="364" height="833" alt="sidepanel_1"
src="https://github.com/user-attachments/assets/e7707eea-831e-45e2-ae0e-8bf590fcbc8c"
/>
<img width="368" height="859" alt="sidepanel_2"
src="https://github.com/user-attachments/assets/fb988cfd-72e8-444d-8733-b9b2b53c4460"
/>
Full-screen View
<img width="832" height="857" alt="fullscreen_1"
src="https://github.com/user-attachments/assets/9fe53bac-dbc3-4471-8ac7-b26fd3080fde"
/>
<img width="847" height="856" alt="fullscreen_2"
src="https://github.com/user-attachments/assets/38734649-af0a-4e27-80f1-293b799fa81e"
/>
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [ ] 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.
[MUSD-1504]:
https://consensyssoftware.atlassian.net/browse/MUSD-1504?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Changes first-touch Money navigation and deposit initiation, which can
block or redirect funding flows if gating regresses; new risk/disclosure
copy is user-facing but not auth or custody logic.
>
> **Overview**
> Adds a **one-time MetaMask Money splash** (benefits, APY copy, shared
FAQs, **Start earning** / close) shown before users reach Money home or
a deposit flow when `moneyFtueSeen` is false.
>
> **Persistence and UI state:** `AppStateController` gains persisted
`moneyFtueSeen` plus `setMoneyFtueSeen`; a `moneyFtue` Redux slice
tracks open/close, deposit vs tab source, pending deposit intent, and
session `acknowledged` so the splash does not reopen mid-session.
>
> **Entry points:** The Money tab opens the splash instead of navigating
on first click; `useMoneyAccountDeposit` intercepts deposits until
acknowledgement (then continues with `skipFtue`); Money home uses
`useOpenMoneyFtueOnFirstVisit`. `MoneyFtueSplash` is mounted globally
when unlocked. FAQ definitions move to `MONEY_FAQ_ITEMS` (adds
safety/controls FAQs) for How it works and the splash.
>
> **Coverage:** New unit/e2e tests, fixtures default `moneyFtueSeen:
true` for existing deposit specs, and en/en_GB locale strings.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
55f24e6. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 448dd92 commit 59895b9
41 files changed
Lines changed: 1681 additions & 68 deletions
File tree
- app
- _locales
- en_GB
- en
- scripts/controllers
- test/e2e
- fixtures
- page-objects
- flows
- pages
- home
- money
- tests
- confirmations/metamask-pay
- metrics/state-snapshots
- money
- settings
- ui
- components/app
- money/money-ftue-splash
- ducks
- money-ftue
- hooks
- money
- pages
- money
- constants
- routes
- store
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
304 | 315 | | |
305 | 316 | | |
306 | 317 | | |
| |||
636 | 647 | | |
637 | 648 | | |
638 | 649 | | |
| 650 | + | |
639 | 651 | | |
640 | 652 | | |
641 | 653 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
498 | 510 | | |
499 | 511 | | |
500 | 512 | | |
| |||
870 | 882 | | |
871 | 883 | | |
872 | 884 | | |
| 885 | + | |
873 | 886 | | |
874 | 887 | | |
875 | 888 | | |
| |||
961 | 974 | | |
962 | 975 | | |
963 | 976 | | |
| 977 | + | |
964 | 978 | | |
965 | 979 | | |
966 | 980 | | |
| |||
1046 | 1060 | | |
1047 | 1061 | | |
1048 | 1062 | | |
| 1063 | + | |
1049 | 1064 | | |
1050 | 1065 | | |
1051 | 1066 | | |
| |||
1129 | 1144 | | |
1130 | 1145 | | |
1131 | 1146 | | |
| 1147 | + | |
1132 | 1148 | | |
1133 | 1149 | | |
1134 | 1150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
| |||
330 | 331 | | |
331 | 332 | | |
332 | 333 | | |
| 334 | + | |
333 | 335 | | |
334 | 336 | | |
335 | 337 | | |
| |||
639 | 641 | | |
640 | 642 | | |
641 | 643 | | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
642 | 650 | | |
643 | 651 | | |
644 | 652 | | |
| |||
773 | 781 | | |
774 | 782 | | |
775 | 783 | | |
| 784 | + | |
776 | 785 | | |
777 | 786 | | |
778 | 787 | | |
| |||
1383 | 1392 | | |
1384 | 1393 | | |
1385 | 1394 | | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
1386 | 1407 | | |
1387 | 1408 | | |
1388 | 1409 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
10 | 47 | | |
11 | 48 | | |
12 | 49 | | |
| |||
21 | 58 | | |
22 | 59 | | |
23 | 60 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 61 | + | |
31 | 62 | | |
32 | 63 | | |
33 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
51 | 55 | | |
52 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
53 | 59 | | |
54 | 60 | | |
55 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
56 | 64 | | |
57 | 65 | | |
58 | 66 | | |
| |||
0 commit comments