feat(perps): show persistent "Submitting your trade" toast during order placement#26432
feat(perps): show persistent "Submitting your trade" toast during order placement#26432michalconsensys merged 6 commits intomainfrom
Conversation
- Show 'Submitting your trade' toast during order placement (replaces Order submitted toast) - Toast persists until completion or user dismiss via close button or swipe left/right - Add swipe-to-dismiss for hasNoTimeout toasts in Toast component - Add orderManagement.shared.submitting() in usePerpsToasts with hasNoTimeout and close button - Remove onSubmitted toast from PerpsOrderView; success/error toasts replace submitting toast - Add locale perps.order.submitting_your_trade and unit tests Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
…toast close handler Co-authored-by: Cursor <cursoragent@cursor.com>
…mask-mobile into feat/perps/tast-persistant
| expect(mockShowToast).toHaveBeenCalled(); | ||
| }); | ||
| // We show "Submitting your trade" (from shared.submitting), not "Order submitted" | ||
| expect(mockSubmitted).not.toHaveBeenCalled(); |
There was a problem hiding this comment.
Test doesn't verify submitting toast is shown
Low Severity
The test "does not show order submitted toast; submitting your trade toast is shown instead" only verifies that mockShowToast was called and that mockSubmitted was not called. It doesn't verify that shared.submitting was called or that mockShowToast received the correct toast configuration. Other tests in this file use toHaveBeenCalledWith to verify the exact toast shown. The test should verify shared.submitting was invoked to ensure the correct toast is displayed.
Triggered by project rule: MetaMask Mobile E2E Testing Guidelines
|
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
SmokePerps is required as this directly affects perpetuals trading order flows. Per the tag description, SmokeWalletPlatform must be selected because Perps is a section inside the Trending tab. SmokeConfirmations is also required because PerpsOrderView is used in the confirmations flow for perpsDepositAndOrder transactions, and the tag description states to select it when selecting SmokePerps for on-chain transactions. The changes are well-tested with updated unit tests and are purely UI feedback changes (toast notifications), not core transaction logic changes. Performance Test Selection: |





Description
What is the reason for the change?
During Perps order placement, users only saw an "Order submitted" toast after the order was sent. There was no feedback while the order was in flight, which could make it unclear that the app was still working.
What is the improvement/solution?
hasNoTimeout, a loading icon, and a close button so users can dismiss it manually if they want.orderManagement.shared.submitting()option inusePerpsToasts, used inPerpsOrderViewbefore calling the order execution hook.Changelog
CHANGELOG entry: Added a persistent "Submitting your trade" toast during Perps order placement so users see clear feedback while the order is processing.
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/TAT-2570
Manual testing steps
Screenshots/Recordings
Before
After
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-02-23.at.16.15.32.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Primarily UI/UX toast behavior changes around order submission with corresponding test and i18n updates; no changes to order execution semantics beyond when toasts are shown.
Overview
Perps order placement now shows a persistent
Submitting your tradetoast immediately when the user places an order, providing in-flight feedback until the order resolves.This removes the prior
onSubmitted-triggeredOrder submittedtoast fromusePerpsOrderExecutionusage, and introduces a newPerpsToastOptions.orderManagement.shared.submitting()toast option (no timeout, loading icon, manual dismiss via close button). Tests and English locale strings were updated accordingly.Written by Cursor Bugbot for commit f2f044f. This will update automatically on new commits. Configure here.