Commit cc420fe
authored
fix: Remove emojis from gas modals (MetaMask#23907)
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->
## **Description**
<!--
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?
-->
This PR aims to drop emoji usage on gas modals and speed row.
It also adds filtering of `high` option in fee levels if they are same
with `medium`.
## **Changelog**
<!--
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: Remove emojis from gas options
## **Related issues**
Fixes: MetaMask/MetaMask-planning#6446
## **Manual testing steps**
```gherkin
Feature: my feature name
Scenario: user [verb for user action]
Given [describe expected initial app state]
When user [verb for user action]
Then [describe expected outcome]
```
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<img width="542" height="1078" alt="Screenshot 2025-12-11 at 00 50 28"
src="https://github.com/user-attachments/assets/260a534e-78b5-4897-b581-7077320497a8"
/>
### **After**
<img width="586" height="1122" alt="Screenshot 2025-12-11 at 00 50 13"
src="https://github.com/user-attachments/assets/62f3ed56-419c-4a0b-ad43-d419fa963ed3"
/>
## **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
- [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.
## **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]
> Removes emojis from gas options/speed and skips the High option when
its fees match Medium for fee market estimates.
>
> - **UI (gas options/speed)**
> - Remove emojis from `GasOption` and `GasSpeed` displays; adjust
styles (`leftSection` spacing) and keep selection indicator/value
display.
> - **Types/Constants**
> - Drop `GasOptionIcon` enum and `GasOption.emoji` field.
> - **Logic**
> - In `useGasFeeEstimateLevelOptions`, omit `High` when its
`maxFeePerGas` and `maxPriorityFeePerGas` equal `Medium` (FeeMarket).
> - **Tests**
> - Update tests to remove emoji assertions; add test ensuring `High` is
excluded when equal to `Medium`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
feaba63. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 24c34ce commit cc420fe
14 files changed
Lines changed: 119 additions & 112 deletions
File tree
- app/components/Views/confirmations
- components
- gas
- gas-option
- gas-speed
- modals/estimates-modal
- constants
- hooks/gas
- types
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 38 | + | |
43 | 39 | | |
44 | 40 | | |
45 | 41 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | | - | |
25 | 23 | | |
26 | 24 | | |
27 | 25 | | |
| |||
Lines changed: 3 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 12 | + | |
| 13 | + | |
22 | 14 | | |
23 | 15 | | |
24 | 16 | | |
| |||
33 | 25 | | |
34 | 26 | | |
35 | 27 | | |
36 | | - | |
37 | 28 | | |
38 | 29 | | |
39 | 30 | | |
| |||
Lines changed: 8 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | 33 | | |
57 | | - | |
58 | | - | |
59 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
60 | 37 | | |
61 | 38 | | |
62 | 39 | | |
| |||
104 | 81 | | |
105 | 82 | | |
106 | 83 | | |
107 | | - | |
| 84 | + | |
108 | 85 | | |
109 | 86 | | |
110 | 87 | | |
| |||
126 | 103 | | |
127 | 104 | | |
128 | 105 | | |
129 | | - | |
| 106 | + | |
130 | 107 | | |
131 | 108 | | |
132 | 109 | | |
| |||
151 | 128 | | |
152 | 129 | | |
153 | 130 | | |
154 | | - | |
| 131 | + | |
155 | 132 | | |
156 | 133 | | |
157 | 134 | | |
| |||
177 | 154 | | |
178 | 155 | | |
179 | 156 | | |
180 | | - | |
| 157 | + | |
181 | 158 | | |
182 | 159 | | |
183 | 160 | | |
| |||
199 | 176 | | |
200 | 177 | | |
201 | 178 | | |
202 | | - | |
| 179 | + | |
203 | 180 | | |
204 | 181 | | |
205 | 182 | | |
| |||
Lines changed: 1 addition & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 15 | | |
33 | 16 | | |
34 | 17 | | |
| |||
86 | 69 | | |
87 | 70 | | |
88 | 71 | | |
89 | | - | |
90 | 72 | | |
91 | 73 | | |
92 | 74 | | |
93 | 75 | | |
94 | 76 | | |
95 | 77 | | |
96 | 78 | | |
97 | | - | |
98 | | - | |
| 79 | + | |
99 | 80 | | |
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
47 | | - | |
48 | 46 | | |
49 | | - | |
50 | 47 | | |
51 | 48 | | |
52 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | 7 | | |
Lines changed: 1 addition & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 12 | + | |
17 | 13 | | |
18 | 14 | | |
19 | 15 | | |
| |||
118 | 114 | | |
119 | 115 | | |
120 | 116 | | |
121 | | - | |
122 | 117 | | |
123 | 118 | | |
124 | 119 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
| |||
Lines changed: 82 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
180 | 179 | | |
181 | 180 | | |
182 | 181 | | |
183 | 182 | | |
184 | 183 | | |
185 | | - | |
186 | 184 | | |
187 | | - | |
188 | 185 | | |
189 | 186 | | |
190 | 187 | | |
191 | 188 | | |
192 | 189 | | |
193 | 190 | | |
194 | 191 | | |
195 | | - | |
196 | 192 | | |
197 | | - | |
198 | 193 | | |
199 | 194 | | |
200 | 195 | | |
201 | 196 | | |
202 | 197 | | |
203 | | - | |
204 | 198 | | |
205 | 199 | | |
206 | 200 | | |
| |||
507 | 501 | | |
508 | 502 | | |
509 | 503 | | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
510 | 586 | | |
0 commit comments