Commit 140fd80
feat: TAT-1479: replaced max fiat amount with token amount (MetaMask#19474)
<!--
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**
Replaced the fiat "max" amount in the `PerpsOrderView` component to
display the token amount instead.
<!--
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**
<!--
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: changed the fiat "max" amount in the PerpsOrderView
component to display the token amount instead.
## **Related issues**
Fixes: [TAT-1479: Replace "Max" by Order size in #tokens in the Trade
screen](https://consensyssoftware.atlassian.net/browse/TAT-1479)
## **Manual testing steps**
1. Visit the PerpsOrderView (trade screen)
2. You should see the token amount underneath the input instead of the
previous fiat "max"
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<!-- [screenshots/recordings] -->
### **After**
<img width="506" height="1074" alt="Screenshot 2025-09-09 at 5 09 52 PM"
src="https://github.com/user-attachments/assets/fc98ee8b-28ee-408c-9886-dfc9e6fc8340"
/>
<!-- [screenshots/recordings] -->
## **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.
## **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.
---------
Co-authored-by: abretonc7s <107169956+abretonc7s@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Nicholas Gambino <nicholas.gambino@consensys.net>1 parent 3245030 commit 140fd80
4 files changed
Lines changed: 85 additions & 61 deletions
File tree
- app/components/UI/Perps
- Views
- PerpsClosePositionView
- PerpsOrderView
- components/PerpsAmountDisplay
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
479 | | - | |
480 | 479 | | |
481 | 480 | | |
482 | 481 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
743 | 743 | | |
744 | 744 | | |
745 | 745 | | |
746 | | - | |
747 | 746 | | |
748 | 747 | | |
749 | 748 | | |
| 749 | + | |
| 750 | + | |
750 | 751 | | |
751 | 752 | | |
752 | 753 | | |
| |||
Lines changed: 80 additions & 53 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | | - | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | | - | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | | - | |
| 47 | + | |
50 | 48 | | |
51 | 49 | | |
52 | 50 | | |
53 | | - | |
54 | 51 | | |
55 | 52 | | |
56 | 53 | | |
57 | 54 | | |
58 | 55 | | |
59 | | - | |
60 | 56 | | |
61 | 57 | | |
62 | | - | |
63 | | - | |
64 | | - | |
| 58 | + | |
65 | 59 | | |
66 | 60 | | |
67 | 61 | | |
| |||
71 | 65 | | |
72 | 66 | | |
73 | 67 | | |
74 | | - | |
75 | 68 | | |
76 | 69 | | |
77 | 70 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 71 | + | |
83 | 72 | | |
84 | 73 | | |
85 | 74 | | |
| |||
91 | 80 | | |
92 | 81 | | |
93 | 82 | | |
94 | | - | |
95 | 83 | | |
96 | 84 | | |
97 | | - | |
| 85 | + | |
98 | 86 | | |
99 | 87 | | |
100 | | - | |
101 | 88 | | |
102 | 89 | | |
103 | 90 | | |
104 | 91 | | |
105 | 92 | | |
106 | 93 | | |
107 | 94 | | |
108 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
109 | 100 | | |
110 | 101 | | |
111 | 102 | | |
| |||
114 | 105 | | |
115 | 106 | | |
116 | 107 | | |
117 | | - | |
118 | 108 | | |
119 | 109 | | |
120 | 110 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 111 | + | |
126 | 112 | | |
127 | 113 | | |
128 | 114 | | |
| |||
135 | 121 | | |
136 | 122 | | |
137 | 123 | | |
138 | | - | |
139 | 124 | | |
140 | 125 | | |
141 | 126 | | |
142 | 127 | | |
143 | 128 | | |
144 | | - | |
145 | 129 | | |
146 | 130 | | |
147 | 131 | | |
| |||
157 | 141 | | |
158 | 142 | | |
159 | 143 | | |
160 | | - | |
161 | 144 | | |
162 | 145 | | |
163 | 146 | | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
| 147 | + | |
169 | 148 | | |
170 | 149 | | |
171 | 150 | | |
| |||
176 | 155 | | |
177 | 156 | | |
178 | 157 | | |
179 | | - | |
180 | 158 | | |
181 | 159 | | |
182 | | - | |
183 | | - | |
184 | | - | |
| 160 | + | |
185 | 161 | | |
186 | 162 | | |
187 | 163 | | |
| |||
192 | 168 | | |
193 | 169 | | |
194 | 170 | | |
195 | | - | |
196 | 171 | | |
197 | 172 | | |
198 | 173 | | |
199 | | - | |
| 174 | + | |
200 | 175 | | |
201 | 176 | | |
202 | 177 | | |
| |||
206 | 181 | | |
207 | 182 | | |
208 | 183 | | |
209 | | - | |
210 | 184 | | |
211 | 185 | | |
212 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
213 | 204 | | |
214 | 205 | | |
215 | | - | |
216 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
217 | 209 | | |
218 | 210 | | |
219 | 211 | | |
220 | 212 | | |
221 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
222 | 254 | | |
223 | 255 | | |
224 | 256 | | |
225 | 257 | | |
226 | 258 | | |
227 | 259 | | |
228 | 260 | | |
229 | | - | |
230 | 261 | | |
231 | 262 | | |
232 | | - | |
| 263 | + | |
233 | 264 | | |
234 | 265 | | |
235 | 266 | | |
236 | 267 | | |
237 | 268 | | |
238 | 269 | | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
| 270 | + | |
243 | 271 | | |
244 | 272 | | |
245 | 273 | | |
246 | 274 | | |
247 | 275 | | |
248 | | - | |
249 | 276 | | |
250 | 277 | | |
251 | | - | |
| 278 | + | |
252 | 279 | | |
253 | 280 | | |
254 | 281 | | |
| |||
Lines changed: 3 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
15 | | - | |
16 | 14 | | |
17 | 15 | | |
18 | 16 | | |
| |||
26 | 24 | | |
27 | 25 | | |
28 | 26 | | |
29 | | - | |
30 | 27 | | |
31 | 28 | | |
32 | 29 | | |
| |||
106 | 103 | | |
107 | 104 | | |
108 | 105 | | |
109 | | - | |
| 106 | + | |
| 107 | + | |
110 | 108 | | |
111 | 109 | | |
112 | 110 | | |
113 | 111 | | |
114 | 112 | | |
115 | 113 | | |
116 | | - | |
117 | | - | |
| 114 | + | |
118 | 115 | | |
119 | 116 | | |
120 | 117 | | |
| |||
0 commit comments