Skip to content

fix(swift-sdk): fix spv usage#3026

Merged
QuantumExplorer merged 15 commits intofeat/iOSSupportfrom
fix/spv-usage
Jan 31, 2026
Merged

fix(swift-sdk): fix spv usage#3026
QuantumExplorer merged 15 commits intofeat/iOSSupportfrom
fix/spv-usage

Conversation

@ZocoLini
Copy link
Collaborator

@ZocoLini ZocoLini commented Jan 27, 2026

With the sync rewrite changes are coming, this PR mainly fixes how SPVClient is being used to be align with the expected, removes ffi calls that are about to be droppped, and prepares the wrapper for the new changes. After the rewrite we can start adding the missing/not yet implemented features.

The main idea is, FFISpvClient will work as a facade for the dash spv ffi and the swift SPVClient class wraps those ffi calls with a swift interface

Issue being fixed or feature implemented

SPV Client FFI usage

What was done?

  • Made spv sync work as expected
  • Cleaned and refactored SPVClient and WalletService to use the FFI as expected
  • SPV sync progress UI updates is made via a SPCSyncProgress struct instead of multiple fields
  • Left room for the incoming updates with the sync rewrite and notes with what need to be fixed/implemented in dash-spv
  • Changed the event system by renaming the protocol used and allowing anyone to implement it, more flexibility using the SPVClient with simpler code

How Has This Been Tested?

Executed the tests and tested the app behavior myself

Breaking Changes

Since no tests needed to be updated I understand that all changes I made are not breaking

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/spv-usage

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ZocoLini ZocoLini marked this pull request as draft January 27, 2026 23:36
@ZocoLini ZocoLini changed the title Fix(swift-sdk): spv usage fix(swift-sdk): spv usage Jan 27, 2026
@ZocoLini ZocoLini marked this pull request as ready for review January 30, 2026 22:53
@QuantumExplorer QuantumExplorer changed the title fix(swift-sdk): spv usage fix(swift-sdk): fix spv usage Jan 31, 2026
@QuantumExplorer QuantumExplorer merged commit 10e9853 into feat/iOSSupport Jan 31, 2026
17 of 18 checks passed
@QuantumExplorer QuantumExplorer deleted the fix/spv-usage branch January 31, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants