Commit b0db4ba
authored
fix: dismiss Batch Sell final review bottom sheet after submit (MetaMask#31842)
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until this PR meets the canonical
Definition of Ready For Review in `docs/readme/ready-for-review.md`.
In short: the template must be materially complete (not just section
titles
present), all status checks must be currently passing, and the only
expected
follow-up commits must be reviewer-driven.
-->
<!--
mms-check directive vocabulary — read by
.github/scripts/shared/pr-template-checks.ts
at module load to build the validation plan. Directives are invisible in
rendered
markdown and must NOT be removed or edited without updating the
validator registry.
type=text Section must contain non-placeholder prose.
type=changelog Section must have a valid CHANGELOG entry: line.
type=issue-link Section must have a Fixes:/Closes:/Refs: line with a
value.
type=manual-testing Section must have real testing steps or an explicit
N/A.
type=screenshot Section must have evidence (image/URL) or an explicit
N/A.
type=checklist Section must have all checkboxes consciously checked.
required=true|false Whether a missing/invalid section runs the validator
at all.
blocking=true|false Whether a failure of this check fails the CI
workflow.
Default: false — failures are shown as warnings in the sticky
comment but do not block the PR.
Sections without a directive are checked for structural presence only.
-->
## **Description**
<!-- mms-check: type=text required=true -->
After submitting a Batch Sell transaction, `BatchSellFinalReviewModal`
navigated to the Activity tab without dismissing the final review bottom
sheet. The modal stack stayed on screen as a transparent overlay, so
users saw the activity list with the review sheet still visible.
This change closes the sheet via `onCloseBottomSheet` before navigating
to `Routes.TRANSACTIONS_VIEW`, matching the pattern used in
`PostTradeBottomSheet` when viewing activity. The close button also
routes through the same sheet ref so dismiss behavior is consistent.
## **Changelog**
<!-- mms-check: type=changelog required=true blocking=true -->
CHANGELOG entry: Fixed Batch Sell final review bottom sheet persisting
after submitting a transaction.
## **Related issues**
<!-- mms-check: type=issue-link required=true -->
Fixes: MetaMask#31839
## **Manual testing steps**
<!-- mms-check: type=manual-testing required=true -->
```gherkin
Feature: Batch Sell final review bottom sheet dismiss
Scenario: user submits a Batch Sell transaction
Given the user has selected multiple tokens for Batch Sell
And quotes have loaded on the final review bottom sheet
And the user has sufficient funds for gas
When the user taps Sell all and the transaction submits successfully
Then the final review bottom sheet dismisses
And the app navigates to the Activity list
And no Batch Sell review sheet remains visible over Activity
Scenario: user closes the final review sheet without submitting
Given the user is on the Batch Sell final review bottom sheet
When the user taps the close button
Then the bottom sheet dismisses
And the user returns to the Batch Sell review screen
```
## **Screenshots/Recordings**
<!-- mms-check: type=screenshot required=true -->
### **Before**
See issue screenshot:
MetaMask#31839 — Activity list
visible with the final review bottom sheet still overlaying the screen
after submit.
### **After**
https://github.com/user-attachments/assets/94a53e32-eded-46fb-bc33-c3a1c9f188c7
## **Pre-merge author checklist**
<!-- mms-check: type=checklist required=true -->
- [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.
#### Performance checks (if applicable)
- [x] I've tested on Android
- Ideally on a mid-range device; emulator is acceptable
- [x] I've tested with a power user scenario
- Use these [power-user
SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93)
to import wallets with many accounts and tokens
- [x] I've instrumented key operations with Sentry traces for production
performance metrics
- See [`trace()`](/app/util/trace.ts) for usage and
[`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274)
for an example
For performance guidelines and tooling, see the [Performance
Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers).
## **Pre-merge reviewer checklist**
<!--
Reviewer checklist items follow the same semantics as the author
checklist: an
unchecked box is ambiguous, a checked box means the reviewer consciously
assessed that responsibility. See `docs/readme/ready-for-review.md`.
-->
- [ ] 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.
Made with [Cursor](https://cursor.com)1 parent 2b5571b commit b0db4ba
2 files changed
Lines changed: 67 additions & 5 deletions
File tree
- app/components/UI/Bridge/components/BatchSellFinalReviewModal
Lines changed: 55 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
143 | 146 | | |
144 | 147 | | |
145 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
146 | 177 | | |
147 | 178 | | |
148 | 179 | | |
| |||
274 | 305 | | |
275 | 306 | | |
276 | 307 | | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
277 | 329 | | |
278 | 330 | | |
279 | 331 | | |
| |||
290 | 342 | | |
291 | 343 | | |
292 | 344 | | |
293 | | - | |
| 345 | + | |
294 | 346 | | |
295 | 347 | | |
296 | 348 | | |
297 | 349 | | |
298 | 350 | | |
299 | 351 | | |
300 | | - | |
| 352 | + | |
| 353 | + | |
301 | 354 | | |
302 | 355 | | |
303 | 356 | | |
| |||
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
303 | 304 | | |
304 | 305 | | |
305 | 306 | | |
| 307 | + | |
306 | 308 | | |
307 | 309 | | |
308 | 310 | | |
| |||
366 | 368 | | |
367 | 369 | | |
368 | 370 | | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
369 | 375 | | |
370 | 376 | | |
371 | 377 | | |
| |||
400 | 406 | | |
401 | 407 | | |
402 | 408 | | |
403 | | - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
404 | 412 | | |
405 | 413 | | |
406 | 414 | | |
| |||
411 | 419 | | |
412 | 420 | | |
413 | 421 | | |
| 422 | + | |
414 | 423 | | |
415 | 424 | | |
416 | 425 | | |
417 | 426 | | |
418 | 427 | | |
419 | | - | |
| 428 | + | |
420 | 429 | | |
421 | 430 | | |
422 | 431 | | |
| |||
0 commit comments