fix(activity): stuck confirmation on back after tx + missing lending deposit token icon#33157
fix(activity): stuck confirmation on back after tx + missing lending deposit token icon#33157vinnyhoward wants to merge 2 commits into
Conversation
Lending deposit rows derived their token from the pool contract (txParams.to) instead of the underlying deposited asset, so the Activity row had no resolvable icon, symbol, or amount. Resolve the supplied token from simulation data / the outgoing Transfer log (falling back to the pool address), and enrich lending token metadata from the tokens API so the row shows the correct avatar and amount. TMCU-1082
…ter a transaction After a full-screen confirmation submitted, the redirect pushed the Activity screen on top of the now-consumed confirmation (approval deleted via deleteAfterResult), so pressing back returned to it and it rendered an infinite loader. A new navigateToActivityAfterConfirmation helper replaces the confirmation's stack with Activity in a single StackActions.replace, avoiding the stale screen and the pop+push double-animation. Wired into the shared transaction confirm hook, batch approvals, the Earn lending deposit/withdrawal views, and the legacy staking footer. TMCU-1001
|
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. |
PR template — items to address before "Ready for review"Warnings — informational, address before merging:
See docs/readme/ready-for-review.md for the full Definition of Ready for Review. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: The PR introduces several related changes:
Tags selected:
The changes are medium risk - they modify navigation behavior after confirmation which is a critical user flow, but the logic is well-contained and the fallback behavior is preserved. Performance Test Selection: |
🧪 Flaky unit test detectionRun history flaky detectionHistorical failure rate is a hint, not proof — review each suggestion in context. See the flaky-test-detection skill for the full pattern reference and manual audit workflow. Failures / runs sampled per window:
AI-detected flaky patterns
|
|



Description
Two related Activity-redesign bug fixes on one branch.
1. Stuck confirmation on back after a transaction (TMCU-1001).
After submitting a full-screen confirmation (send, Earn pooled-staking, or stablecoin lending), the app redirects to the Activity screen. With the Money-account feature enabled, Activity is registered as a root-level screen, so the redirect pushed it on top of the still-mounted confirmation — whose approval had already been consumed (
deleteAfterResult). Pressing back returned to that consumed confirmation, which rendered an infinite loader/skeleton.The fix adds a shared
navigateToActivityAfterConfirmationhelper that replaces the confirmation's stack with Activity in a singleStackActions.replace, removing the stale confirmation from the back stack. It's wired into the shared transaction confirm hook (useTransactionConfirm), batch approvals (useConfirmActions), the Earn lending deposit/withdrawal views, and the legacy staking footer.Approach note: I first tried to make "back" return to the transaction build screen (amount / recipient / input). On a native-stack that means removing the nested confirmation while pushing a root-level Activity — two screen changes that react-native-screens animates at the same time, producing a double-navigation on the way in and a flashing half-finished pop on the way back. After several attempts to work around the animation, the reliable single-transition solution was to replace the confirmation's whole stack. As a result: send/staking → back returns to Wallet home; lending → back returns to the input screen (its input lives in a separate stack that survives the replace).
2. Missing token icon/amount on lending deposit rows (TMCU-1082).
Lending deposit Activity rows derived their token from the pool contract (
txParams.to) instead of the underlying deposited asset, so the row had no resolvable icon, symbol, or amount. The supplied token is now resolved from simulation data / the outgoing Transfer log (falling back to the pool address), and lending token metadata is enriched from the tokens API; the row avatar uses the resolved token.Changelog
CHANGELOG entry: Fixed the Activity screen back button returning to a stuck confirmation screen after a transaction, and fixed the missing token icon and amount on Earn lending deposit rows.
Related issues
Fixes: TMCU-1001
Fixes: TMCU-1082
Manual testing steps
Also covered by automated tests: real-navigator integration tests for all three navigation flows (
navigateToActivityAfterConfirmation.test.tsx), the redirect call sites, and the lending row/adapter changes (ActivityListItemRow,local-transaction).Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
Pre-merge reviewer checklist