Commit e3a3c5f
authored
feat(money): show Paid by MetaMask on sponsored mUSD conversions (#30120)
## **Description**
When MM Pay returns a fully sponsored mUSD conversion quote (network,
provider, and MetaMask fees all zero), the confirmation screen now
surfaces the sponsorship explicitly: the "Transaction fee" row renders a
green check + "Paid by MetaMask" label instead of "$0", and the
redundant fee-breakdown tooltip is hidden. Polishes the same screen to
match design: 8px row gap, "Confirm" CTA, icon-primary header (i), the
Total row is hidden for mUSD conversion, and the screen overlays the
bottom tab bar when launched from Money Home / Potential Earnings.
## **Changelog**
CHANGELOG entry: Added a "Paid by MetaMask" treatment on the mUSD
conversion confirmation screen when MetaMask fully sponsors the network,
provider, and gas fees.
## **Related issues**
Fixes:
[MUSD-794](https://consensyssoftware.atlassian.net/browse/MUSD-794)
## **Manual testing steps**
```gherkin
Feature: Paid by MetaMask on sponsored mUSD conversion
Scenario: user converts a small amount of USDC to mUSD
Given the user is on Money Home with a USDC balance
And the conversion quote returns zero network, provider, and MetaMask fees
When the user taps a token's "Get 3% mUSD bonus" entry, enters an amount, and waits for the quote
Then the confirmation screen overlays the bottom tab bar
And the Transaction fee row shows a green check + "Paid by MetaMask" with no tooltip
And the Total row is hidden
And the Claimable bonus row shows 3%
And the primary CTA reads "Confirm"
```
## **Screenshots/Recordings**
### **After**
<img width="1206" height="2622" alt="image"
src="https://github.com/user-attachments/assets/f42b67d0-060e-4b55-9368-1a712687f3b3"
/>
<img width="1206" height="2622" alt="image"
src="https://github.com/user-attachments/assets/431f37a2-713a-41e3-b709-bb96c724d943"
/>
<img width="1206" height="2622" alt="image"
src="https://github.com/user-attachments/assets/4f4c7d23-4be1-45b9-ac3e-b5f7e5fca652"
/>
## **Pre-merge author checklist**
- [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
- [ ] 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)
- [ ] I've tested on Android
- [ ] I've tested with a power user scenario
- [ ] I've instrumented key operations with Sentry traces for production
performance metrics
## **Pre-merge reviewer checklist**
- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] 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-794]:
https://consensyssoftware.atlassian.net/browse/MUSD-794?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Updates the transaction confirmation fee/total presentation for
`musdConversion` and adjusts navigation/tooltip behavior, which could
affect conversion confirmation UX and fee transparency if edge cases
(missing fee fields/quotes) are mishandled.
>
> **Overview**
> mUSD conversion confirmations now explicitly show sponsorship: when MM
Pay returns quotes and *all* fee components are zero, the **Transaction
fee** row renders a green check + `Paid by MetaMask` label and
suppresses the fee-breakdown tooltip via the new `useIsPaidByMetaMask`
hook.
>
> The confirmation screen is further aligned to the sponsored design by
hiding the `TotalRow` for `musdConversion`, changing the CTA label to
`earn.musd_conversion.confirm`, and replacing the old `useTooltipModal`
navbar info flow with an inline `TooltipModal` (`TooltipNode`) rendered
by `MusdConversionInfo` (including updated tooltip copy and analytics
for the terms link).
>
> Navigation into redesigned confirmations from the Earn stack is
adjusted to present as a `card`, and Money conversion initiation calls
drop the `navigationStack` parameter. Tests, smoke specs, and English
strings are updated accordingly.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
7c32351. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 7ab53fd commit e3a3c5f
17 files changed
Lines changed: 464 additions & 136 deletions
File tree
- app/components
- UI
- Earn
- hooks
- routes
- Money/Views
- MoneyHomeView
- MoneyPotentialEarningsView
- Views/confirmations
- components
- info
- custom-amount-info
- musd-conversion-info
- rows
- bridge-fee-row
- total-row
- hooks/pay
- locales/languages
- tests/smoke/wallet
Lines changed: 36 additions & 62 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | | - | |
34 | | - | |
35 | 32 | | |
36 | 33 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | 34 | | |
41 | 35 | | |
42 | | - | |
43 | | - | |
44 | 36 | | |
45 | 37 | | |
46 | 38 | | |
| |||
49 | 41 | | |
50 | 42 | | |
51 | 43 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | 44 | | |
57 | 45 | | |
58 | 46 | | |
| |||
78 | 66 | | |
79 | 67 | | |
80 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
81 | 75 | | |
82 | 76 | | |
83 | 77 | | |
| |||
162 | 156 | | |
163 | 157 | | |
164 | 158 | | |
165 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
166 | 169 | | |
167 | | - | |
168 | | - | |
| 170 | + | |
169 | 171 | | |
170 | 172 | | |
171 | 173 | | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
179 | 177 | | |
180 | 178 | | |
181 | | - | |
| 179 | + | |
182 | 180 | | |
183 | 181 | | |
184 | 182 | | |
| |||
188 | 186 | | |
189 | 187 | | |
190 | 188 | | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
217 | 199 | | |
218 | | - | |
219 | | - | |
| 200 | + | |
220 | 201 | | |
221 | 202 | | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
| 203 | + | |
233 | 204 | | |
234 | 205 | | |
235 | 206 | | |
| |||
239 | 210 | | |
240 | 211 | | |
241 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
242 | 216 | | |
243 | 217 | | |
Lines changed: 33 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
| 88 | + | |
107 | 89 | | |
108 | 90 | | |
109 | 91 | | |
110 | 92 | | |
111 | 93 | | |
112 | 94 | | |
113 | 95 | | |
114 | | - | |
| 96 | + | |
115 | 97 | | |
116 | 98 | | |
117 | 99 | | |
| |||
135 | 117 | | |
136 | 118 | | |
137 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
138 | 148 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
887 | 887 | | |
888 | 888 | | |
889 | 889 | | |
890 | | - | |
891 | 890 | | |
892 | 891 | | |
893 | 892 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
182 | 181 | | |
183 | 182 | | |
184 | 183 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
| |||
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
100 | | - | |
101 | 99 | | |
102 | 100 | | |
103 | 101 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
437 | | - | |
| 437 | + | |
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
Lines changed: 10 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
69 | 72 | | |
70 | 73 | | |
0 commit comments