-
Notifications
You must be signed in to change notification settings - Fork 8
Android send flow clean up fix #524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
640a704 to
0ee2234
Compare
📝 WalkthroughWalkthroughRefactored SendFlowManager cleanup timing by removing the clearing call from SelectedWalletScreen's LaunchedEffect and adding it to SendFlowContainer's DisposableEffect. This relocates cleanup from wallet screen return to container disposal, altering when the send flow state is reset. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryFixed critical crash caused by premature cleanup of Key ChangesCritical Bug Fix (SendFlow lifecycle):
Android Build Configuration:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant SelectedWalletScreen
participant SendFlowContainer
participant SendFlowManager
participant RustCore
Note over User,RustCore: Before Fix (Crash Scenario)
User->>SelectedWalletScreen: Navigate to wallet
SelectedWalletScreen->>SendFlowManager: clearSendFlowManager()
SendFlowManager->>RustCore: close() and destroy
Note over SendFlowManager,RustCore: Object destroyed
User->>SendFlowContainer: Navigate to send flow
SendFlowContainer->>RustCore: Access destroyed object
RustCore-->>SendFlowContainer: CRASH ❌
Note over User,RustCore: After Fix (Proper Cleanup)
User->>SelectedWalletScreen: Navigate to wallet
Note over SelectedWalletScreen: No premature cleanup
User->>SendFlowContainer: Navigate to send flow
SendFlowContainer->>SendFlowManager: Initialize manager
SendFlowManager->>RustCore: Create and use safely ✓
User->>SendFlowContainer: Exit send flow
SendFlowContainer->>SendFlowManager: DisposableEffect cleanup
SendFlowContainer->>SendFlowManager: clearSendFlowManager()
SendFlowManager->>RustCore: close() and destroy
Note over SendFlowManager,RustCore: Object destroyed at proper time ✓
|
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.