feat: Replace EVM transaction details modal with bottom sheet#25400
feat: Replace EVM transaction details modal with bottom sheet#25400
Conversation
- Create TransactionDetailsSheet component wrapping TransactionDetails - Add SHEET.TRANSACTION_DETAILS route - Register TransactionDetailsSheet in RootModalNav navigator - Update TransactionElement to navigate to sheet instead of showing modal - Remove detailsModalVisible state and onCloseDetailsModal method
app/components/UI/TransactionElement/TransactionDetailsSheet/TransactionDetailsSheet.tsx
Outdated
Show resolved
Hide resolved
- Create TransactionDetailsSheet component wrapping TransactionDetails - Add SHEET.TRANSACTION_DETAILS route - Register TransactionDetailsSheet in RootModalNav navigator - Update TransactionElement to navigate to sheet instead of showing modal - Pass showSpeedUpModal/showCancelModal callbacks from TransactionElement - Sheet closes first, then triggers the callback with proper gas data
57d1227 to
6895e64
Compare
app/components/UI/TransactionElement/TransactionDetailsSheet/TransactionDetailsSheet.tsx
Show resolved
Hide resolved
TransactionDetails is now rendered inside TransactionDetailsSheet, so the import in TransactionElement is no longer needed.
TransactionDetails already calls close() before invoking showSpeedUpModal/showCancelModal, so the sheet handlers don't need to close again. This prevents double navigation.goBack() calls.
vinnyhoward
left a comment
There was a problem hiding this comment.
LGTM glad that modal is gone. I've always hated that UX
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Performance Test Selection: |
|
|
||
| const handleClose = useCallback(() => { | ||
| sheetRef.current?.onCloseBottomSheet(); | ||
| }, []); |
There was a problem hiding this comment.
Block explorer navigation conflicts with sheet close
High Severity
When viewing a transaction on the block explorer, TransactionDetails.viewOnEtherscan() calls navigation.push('Webview') followed by close(). The new handleClose triggers sheetRef.current?.onCloseBottomSheet(), which eventually calls navigation.goBack() due to shouldNavigateBack={true} on the BottomSheet. This causes the user to be navigated back from the webview after the close animation completes. The existing MultichainTransactionDetailsSheet handles this correctly by passing the navigation as a callback to onCloseBottomSheet(), ensuring navigation happens after the sheet closes instead of before.
There was a problem hiding this comment.
sorry bot, I can't reproduce this one.
cant_repro.mp4
|





Description
This PR replaces the legacy
react-native-modalbased transaction details modal inTransactionElementwith a modern bottom sheet component, aligning with the pattern already used for multichain transactions (MultichainTransactionDetailsSheet).Why this change?
The existing transaction details modal used
react-native-modalwrapped inDetailsModal, which is:What was changed?
Key architectural change: The modal has been replaced with a navigation-based bottom sheet pattern:
TransactionElementTransactionDetailsSheetviaRoutes.SHEET.TRANSACTION_DETAILSdetailsModalVisible)TransactionDetailsBottomSheetwrappingTransactionDetailsWhat remains the same?
✅ All existing functionality is preserved:
TransactionDetailscomponent is reused inside the new sheet (no changes to transaction details rendering)Files changed:
TransactionDetailsSheet.tsx(new) - Bottom sheet component that wrapsTransactionDetailsTransactionDetailsSheet/index.ts(new) - Export fileRoutes.ts- AddedSHEET.TRANSACTION_DETAILSrouteApp.tsx- RegisteredTransactionDetailsSheetinRootModalNavnavigatorTransactionElement/index.js- UpdatedonPressItemto navigate to sheet, removed modal code and related stateChangelog
CHANGELOG entry: Replaced transaction details modal with bottom sheet for improved UX consistency
Related issues
Fixes: #23782 Fixes: #22319
Manual testing steps
Screenshots/Recordings
Before
before_tx_det.mp4
After
after_tx_det.mp4
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Moderate risk because it changes the interaction flow for opening EVM transaction details from an inline modal to navigation-driven sheets, which can impact back/close behavior and action callbacks (speed up/cancel).
Overview
Replaces the legacy inline
react-native-modaltransaction details modal inTransactionElementwith a navigation-driven bottom sheet (TransactionDetailsSheet).Adds a new
Routes.SHEET.TRANSACTION_DETAILSentry and registers the sheet inRootModalFlow, then updates transaction row presses to navigate to the sheet and pass the transaction data plus speed-up/cancel callbacks via route params.Written by Cursor Bugbot for commit 9f52d9e. This will update automatically on new commits. Configure here.