-
Notifications
You must be signed in to change notification settings - Fork 0
feat: polish backup & restore #461
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
# Conflicts: # app/src/main/java/to/bitkit/repositories/BackupRepo.kt
# Conflicts: # app/src/main/java/to/bitkit/repositories/BackupRepo.kt
9c8b124 to
3efa06f
Compare
app/src/main/java/to/bitkit/viewmodels/ActivityListViewModel.kt
Dismissed
Show dismissed
Hide dismissed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR delivers comprehensive improvements to the Backup & Restore system across multiple areas including wallet wipe functionality, restore wallet screen refactoring, and activity list management. The changes modernize the codebase by migrating to MVVM patterns, improving state management with reactive flows, and enhancing UX with relative timestamps.
- Full refactor of RestoreWalletScreen to MVVM with new RestoreWalletViewModel
- Extraction of wallet wipe logic into WipeWalletUseCase with comprehensive unit tests
- Activity list filtering refactored to use reactive flows and simplified state management
- Backup system improvements including payload models, timestamp preservation, and thread safety
Reviewed Changes
Copilot reviewed 47 out of 47 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| gradle/libs.versions.toml | Updates bitkit-core dependency to version 0.1.27 |
| app/src/test/java/to/bitkit/viewmodels/RestoreWalletViewModelTest.kt | Adds comprehensive unit tests for RestoreWalletViewModel (663 lines) |
| app/src/test/java/to/bitkit/usecases/WipeWalletUseCaseTest.kt | Adds unit tests for WipeWalletUseCase covering various scenarios |
| app/src/main/java/to/bitkit/viewmodels/RestoreWalletViewModel.kt | New ViewModel implementing restore wallet logic with state management |
| app/src/main/java/to/bitkit/viewmodels/ActivityListViewModel.kt | Refactored to use reactive flows and simplified filter state |
| app/src/main/java/to/bitkit/usecases/WipeWalletUseCase.kt | Extracted wallet wipe logic into dedicated use case |
| app/src/main/java/to/bitkit/services/core/Bip39Service.kt | New service wrapping BIP39 operations from bitkit-core |
| app/src/main/java/to/bitkit/repositories/BackupRepo.kt | Enhanced with payload models and improved thread safety |
| app/src/main/java/to/bitkit/repositories/ActivityRepo.kt | Added state management and new methods for activity tags |
| app/src/main/java/to/bitkit/ui/onboarding/RestoreWalletScreen.kt | Complete refactor from stateful to MVVM pattern |
| app/src/main/java/to/bitkit/ext/DateTime.kt | Added toRelativeTimeString() for human-readable timestamps |
| app/src/main/res/values/strings.xml | Added new string resources for backup statuses |
ben-kaufman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
tested backup and restore on Android.
iOS will need to be updated to the new format of settings and widgets backup.
|
@ben-kaufman Updated PR with (hopefully) last changes:
Please do one final re-review of the changes so we can merge it & move on 🙏🏻 |
|
Starting review |
|
Note: Once finished, we must remember test creating a wallet on RN app and restoring it on native |
We have a dedicated work item on the roadmap specifically for this and any additional "Migration Strategy" related work. Support for it was out of scope in this PR. |
|
Small issue, seems like on wipe wallet widgets aren't getting cleared @ovitrif |
Code Review: PR #461 - Backup & Restore System PolishSummaryThis is a substantial and well-architected PR that delivers significant improvements to the backup/restore system, wallet wipe functionality, restore screen UX, and activity management. The changes are thoughtfully designed with good separation of concerns, proper MVVM architecture, and comprehensive test coverage for critical paths. Overall Assessment: ✅ Approved with minor suggestions 🎯 Strengths1. Excellent Architecture & Design Patterns
2. Thread Safety & Concurrency
3. Comprehensive Testing
4. User Experience Improvements
5. Code Quality
|
app/src/main/java/to/bitkit/ui/settings/backups/ConfirmMnemonicScreen.kt
Show resolved
Hide resolved
jvsena42
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested:
- Perform unchain and LN transactions
- Set tags
- Wipe app
- Set mnemonic
- Check if the data was recovered
Completes Roadmap item: Backup & Restore
Backup & Restore System Polish across all Core Flows
Description
This PR delivers significant architectural improvements and UX polish across three major areas of the app:
1. Backup & Restore System
Changes: Robustness optimisations, various fixes, UI polish
2. Wallet Wipe Feature
Changes: Refactor to domain use-case, various fixes & performance optimization
WipeWalletUseCase3. Restore Wallet Screen
Changes: Full refactor to MVVM, UI/UX polish, paste UX overhaul, unit tests
Bip39Servicewhich uses thebitkit-coreAPIs4. Activity List & Filtering
Changes: Full refactor of lists & filters state management, fixes and improvements
bitkit-coreactivity dbbitkit-coremetadata modelsPreview
Backup Settings
QA Notes
1️⃣ Main Test
optional:when in Restore screen from Onboarding regression test its functionalitiesoptional:Go to backup settings screens to validate newtime agosubtitles in 2 or 3 languages2️⃣ Regression Test
3️⃣ Slop Tests
A. Backup & Restore System
Backup Status Display:
Backup Execution:
Backup Content: (regression)
Backup During Special States:
B. Wallet Wipe
Complete Cleanup:
Edge Cases:
C. Onboarding Restore Screen
Basic Restore Scenarios: (regression)
Paste Functionality:
Input Navigation & UX:
State Management: (regression)
D. Activity List & Filtering (regression)
Display & Navigation:
Search & Filtering: (regression)
Tag Backup & Restore: (regression)