Repository navigation
Commit 7005dc7
authored
chore(ramps): remove the rampsEnabled feature flag (#47459)
## **Description**
Removes the fully rolled-out `rampsEnabled` remote feature flag. Its
production default is already `{ enabled: true, minimumVersion:
'13.48.0' }`, so this deletes the off-path rather than changing behavior
for supported versions.
This is a prerequisite for the `/buy` deep-link work in #46498, which
currently has to thread the flag through the deep-link router. Landing
the removal first keeps that PR free of rollout-gate plumbing.
Changes:
- Deletes `getIsRampsEnabled` from `ui/selectors/ramps-feature-flags.ts`
and its selector tests.
- Removes the `!isEnabled → open Portfolio` branch from
`useRampsNavigation`.
- Removes the analytics no-op guard from `useRampsAnalytics` and the
flag check from `useRampsScreenViewed`.
- Removes `rampsEnabled` from the e2e feature-flag registry.
- Keeps `rampsServiceDisruption` as the service kill switch.
## **Changelog**
CHANGELOG entry: null
## **Related issues**
Fixes:
## **Manual testing steps**
1. Run the extension.
2. Open the Buy flow from the wallet (e.g. the Buy button or token list)
and verify it opens the in-app unified buy flow.
3. Advance through token selection and provider selection, then verify
`ramps-*` events still fire in the Segment debugger.
4. Turn on the `rampsServiceDisruption` remote flag (or override it
locally) and verify the service-disruption modal is still shown.
5. Open a `/buy` deep link from a dapp and verify its routing is
unchanged by this PR (the routing change is in #46498).
<!--
## **Screenshots/Recordings**
### **Before**
### **After**
-->
## **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
- [x] 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.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Changes default Buy routing for any client that still had
`rampsEnabled` off, and removes analytics silencing tied to that flag;
`rampsServiceDisruption` behavior is unchanged.
>
> **Overview**
> Removes the fully rolled-out **`rampsEnabled`** remote flag so the
in-app ramps buy path is always used instead of treating “flag off” as
“open Portfolio.” **`getIsRampsEnabled`** and its selector tests are
deleted; **`rampsEnabled`** is dropped from the E2E feature-flag
registry. **`rampsServiceDisruption`** stays as the kill switch.
>
> **`useRampsNavigation.goToBuy`** no longer short-circuits to
**`openBuyCryptoInPdapp`** when the rollout flag was false—Portfolio
migration, geo, disruption, and native routing behave as they did when
the flag was on. **`useRampsAnalytics`** and **`useRampsScreenViewed`**
no longer skip **`ramps-*`** events when the flag was off.
>
> Tests drop flag-gating cases and align Buy entry assertions with
**`goToBuy`** (wallet overviews, asset page); ramps UI tests stub
analytics where the background connection is not initialized.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
6cc38b5. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent b151b6f commit 7005dc7
14 files changed
Lines changed: 66 additions & 210 deletions
File tree
- test/e2e/feature-flags
- ui
- components/app/wallet-overview
- hooks/ramps
- pages
- asset/components
- ramps
- provider-selection
- token-selection
- selectors
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3936 | 3936 | | |
3937 | 3937 | | |
3938 | 3938 | | |
3939 | | - | |
3940 | | - | |
3941 | | - | |
3942 | | - | |
3943 | | - | |
3944 | | - | |
3945 | | - | |
3946 | | - | |
3947 | | - | |
3948 | | - | |
3949 | | - | |
3950 | 3939 | | |
3951 | 3940 | | |
3952 | 3941 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
91 | 99 | | |
92 | 100 | | |
93 | 101 | | |
| |||
639 | 647 | | |
640 | 648 | | |
641 | 649 | | |
642 | | - | |
643 | | - | |
644 | | - | |
| 650 | + | |
645 | 651 | | |
646 | 652 | | |
647 | 653 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
87 | 97 | | |
88 | 98 | | |
89 | 99 | | |
| |||
323 | 333 | | |
324 | 334 | | |
325 | 335 | | |
326 | | - | |
| 336 | + | |
327 | 337 | | |
328 | 338 | | |
329 | 339 | | |
| |||
332 | 342 | | |
333 | 343 | | |
334 | 344 | | |
335 | | - | |
336 | | - | |
337 | | - | |
| 345 | + | |
338 | 346 | | |
339 | 347 | | |
340 | 348 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 31 | + | |
| 32 | + | |
35 | 33 | | |
36 | 34 | | |
37 | 35 | | |
| |||
84 | 82 | | |
85 | 83 | | |
86 | 84 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | 85 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | | - | |
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
| |||
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | 39 | | |
46 | 40 | | |
47 | 41 | | |
48 | | - | |
49 | 42 | | |
50 | 43 | | |
51 | 44 | | |
| |||
62 | 55 | | |
63 | 56 | | |
64 | 57 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | 58 | | |
69 | 59 | | |
70 | 60 | | |
| |||
76 | 66 | | |
77 | 67 | | |
78 | 68 | | |
79 | | - | |
| 69 | + | |
80 | 70 | | |
81 | 71 | | |
82 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
| |||
96 | 95 | | |
97 | 96 | | |
98 | 97 | | |
99 | | - | |
| 98 | + | |
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
| |||
159 | 158 | | |
160 | 159 | | |
161 | 160 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
| 161 | + | |
179 | 162 | | |
180 | 163 | | |
181 | 164 | | |
| |||
287 | 270 | | |
288 | 271 | | |
289 | 272 | | |
290 | | - | |
| 273 | + | |
291 | 274 | | |
292 | 275 | | |
293 | 276 | | |
| |||
317 | 300 | | |
318 | 301 | | |
319 | 302 | | |
320 | | - | |
| 303 | + | |
321 | 304 | | |
322 | 305 | | |
323 | 306 | | |
| |||
347 | 330 | | |
348 | 331 | | |
349 | 332 | | |
350 | | - | |
| 333 | + | |
351 | 334 | | |
352 | 335 | | |
353 | 336 | | |
| |||
377 | 360 | | |
378 | 361 | | |
379 | 362 | | |
380 | | - | |
381 | 363 | | |
382 | 364 | | |
383 | 365 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 19 | + | |
23 | 20 | | |
24 | 21 | | |
25 | 22 | | |
| |||
121 | 118 | | |
122 | 119 | | |
123 | 120 | | |
124 | | - | |
125 | | - | |
126 | 121 | | |
127 | 122 | | |
128 | 123 | | |
| |||
133 | 128 | | |
134 | 129 | | |
135 | 130 | | |
136 | | - | |
137 | 131 | | |
138 | 132 | | |
139 | 133 | | |
| |||
146 | 140 | | |
147 | 141 | | |
148 | 142 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | 143 | | |
158 | 144 | | |
159 | 145 | | |
| |||
258 | 244 | | |
259 | 245 | | |
260 | 246 | | |
261 | | - | |
262 | 247 | | |
263 | 248 | | |
264 | 249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
| 1 | + | |
5 | 2 | | |
6 | 3 | | |
7 | 4 | | |
| |||
27 | 24 | | |
28 | 25 | | |
29 | 26 | | |
30 | | - | |
31 | | - | |
32 | | - | |
| 27 | + | |
33 | 28 | | |
34 | 29 | | |
35 | 30 | | |
| |||
77 | 72 | | |
78 | 73 | | |
79 | 74 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | 75 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | 2 | | |
5 | 3 | | |
6 | 4 | | |
| |||
25 | 23 | | |
26 | 24 | | |
27 | 25 | | |
28 | | - | |
29 | 26 | | |
30 | 27 | | |
31 | 28 | | |
| |||
40 | 37 | | |
41 | 38 | | |
42 | 39 | | |
43 | | - | |
| 40 | + | |
44 | 41 | | |
45 | 42 | | |
46 | 43 | | |
47 | 44 | | |
48 | | - | |
| 45 | + | |
49 | 46 | | |
0 commit comments