[LWM] feat(perps): close the mobile deposit with a transaction signed screen - #21472
[LWM] feat(perps): close the mobile deposit with a transaction signed screen#21472ooke-ledger wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The new receipt screen and swapId plumbing are consistently wired through navigation, state, and tests with no confirmed functional gaps in the reviewed changes.
Pull request overview
Adds a new “Transaction signed” receipt screen to the mobile Perps deposit flow, mirroring the desktop behavior, and wires the deposit execution outcome (swapId) through to enable a “View transaction” CTA that opens the swap status drawer.
Changes:
- Introduces
PerpsTransactionSignedscreen (view + viewmodel) with optional “View transaction” CTA that opens the swap status drawer when aswapIdexists. - Updates the Perps deposit signing flow so
onDonecarries aPerpsDepositOutcome(includingswapId) and replaces the deposit form with the receipt screen after broadcast. - Minor UI tweak: centers the wrapped “no quote” error message in the deposit form.
File summaries
| File | Description |
|---|---|
| apps/ledger-live-mobile/src/mvvm/features/Perps/screens/PerpsTransactionSigned/usePerpsTransactionSignedViewModel.ts | ViewModel for receipt screen; closes screen and optionally opens swap status drawer using swapId. |
| apps/ledger-live-mobile/src/mvvm/features/Perps/screens/PerpsTransactionSigned/PerpsTransactionSignedScreen.tsx | Screen container wiring navigation props into the ViewModel. |
| apps/ledger-live-mobile/src/mvvm/features/Perps/screens/PerpsTransactionSigned/index.tsx | Receipt UI (InfoState + success gradient + optional CTA). |
| apps/ledger-live-mobile/src/mvvm/features/Perps/screens/PerpsTransactionSigned/tests/usePerpsTransactionSignedViewModel.test.ts | Unit tests for receipt ViewModel behaviors (CTA presence, drawer handoff, close). |
| apps/ledger-live-mobile/src/mvvm/features/Perps/screens/PerpsTransactionSigned/integrations/perpsTransactionSigned.integration.test.tsx | Integration coverage for receipt rendering and CTA visibility. |
| apps/ledger-live-mobile/src/mvvm/features/Perps/screens/PerpsDeposit/usePerpsDepositViewModel.ts | Navigates to receipt via navigation.replace on successful signing, passing swapId + provider. |
| apps/ledger-live-mobile/src/mvvm/features/Perps/screens/PerpsDeposit/index.tsx | Centers the wrapped “no quote” error text. |
| apps/ledger-live-mobile/src/mvvm/features/Perps/screens/PerpsDeposit/components/PerpsDepositSign/usePerpsDepositSignViewModel.ts | Updates onDone prop typing to accept the deposit outcome payload. |
| apps/ledger-live-mobile/src/mvvm/features/Perps/screens/PerpsDeposit/components/PerpsDepositSign/tests/usePerpsDepositSignViewModel.test.ts | Updates tests for new onDone(outcome) callback signature. |
| apps/ledger-live-mobile/src/mvvm/features/Perps/screens/PerpsDeposit/tests/usePerpsDepositViewModel.test.ts | Updates tests for receipt navigation (replace) and swapId plumbing. |
| apps/ledger-live-mobile/src/mvvm/features/Perps/screens/PerpsDeposit/integrations/perpsDepositSign.integration.test.tsx | Integration test asserting navigation to receipt on successful signing. |
| apps/ledger-live-mobile/src/mvvm/features/Perps/hooks/usePerpsDepositExecution.ts | Introduces PerpsDepositOutcome and passes swapId through onDone. |
| apps/ledger-live-mobile/src/mvvm/features/Perps/hooks/tests/usePerpsDepositExecution.test.ts | Updates expectation for onDone to receive { swapId }. |
| apps/ledger-live-mobile/src/locales/en/common.json | Adds English strings for the receipt screen. |
| apps/ledger-live-mobile/src/const/navigation.ts | Adds ScreenName.PerpsTransactionSigned. |
| apps/ledger-live-mobile/src/components/RootNavigator/types/BaseNavigator.ts | Registers navigation params type for the new screen. |
| apps/ledger-live-mobile/src/components/RootNavigator/BaseNavigator.tsx | Registers the new screen in the base stack (header hidden). |
| .changeset/perps-transaction-signed-mobile.md | Changeset documenting the new user-facing mobile Perps deposit completion screen. |
Review details
- Files reviewed: 18/18 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Rsdoctor Bundle Diff AnalysisFound 7 projects in monorepo, 7 projects with changes. 📊 Quick Summary
📋 Detailed Reports (Click to expand)📁 desktop-mainPath:
📁 desktop-preloaderPath:
📁 desktop-rendererPath:
📁 desktop-webviewDappPreloaderPath:
📁 desktop-webviewPreloaderPath:
📁 desktop-workersPath:
📁 mobilePath:
Generated by Rsdoctor GitHub Action |
Stacked on #21457. Mobile port of #21260.
Adds the transaction signed screen that closes the deposit flow, with a View transaction CTA into the swap status drawer.
onDonenow carries theswapId.Also includes one unrelated one-liner: centres the wrapped "no quote" error.