-
Notifications
You must be signed in to change notification settings - Fork 12
fix: issue 289 #290
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
fix: issue 289 #290
Conversation
…r` and `WalletSyncScriptInspector`
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 fixes issue 289 by refactoring the wallet sync and full scan inspectors into separate files and converting them into actors. It also removes duplicate progress update functions from several view models in favor of concise closure-based implementations.
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
BDKSwiftExampleWallet/View Model/WalletViewModel.swift | Implements closure-based progress update and removes unused update functions. |
BDKSwiftExampleWallet/View Model/Settings/SettingsViewModel.swift | Replaces the old updateProgressFullScan function with a closure for updating progress. |
BDKSwiftExampleWallet/View Model/Activity/ActivityListViewModel.swift | Introduces a closure-based updateProgress and removes the redundant function implementation. |
BDKSwiftExampleWallet/Actor/WalletSyncScriptInspector.swift | Moves sync inspector logic into an actor; note the use of a synchronous sleep call in an actor context. |
BDKSwiftExampleWallet/Actor/WalletFullScanScriptInspector.swift | Moves full scan inspector logic into an actor using closure-based progress updates. |
Files not reviewed (1)
- BDKSwiftExampleWallet.xcodeproj/project.pbxproj: Language not supported
Nice! Feel free to add me as reviewer when this is ready for review (just want to make sure I don't start reviewing before you're ready) |
Hi @reez, I believe I don’t have the necessary permissions to add reviewers to PRs. Could you please take a look at it? |
yeah my bad, take a look to see if you got an invite/access |
I received and accepted!! thk @reez |
What do you think about https://github.com/bitcoindevkit/BDKSwiftExampleWallet/pull/290/files#r2058436583 comment from Copilot? Otherwise tested and everything works great! |
I’ll take care of it! One way to solve this is by using Task.sleep inside a Task, because we can’t make inspect function async to use Task.sleep directly. I just tested this solution and works perfectly. |
Love it, perfect solution. And by the way the reason I had to |
Description
Fix issue 289
Notes to the reviewers
This PR includes a small refactor that extracts the
WalletSyncScriptInspector
andWalletFullScanScriptInspector
classes into separate files, and both have now been converted intoactors
.Checklists
All Submissions:
.swift-format
fileNew Features:
Bugfixes: