Skip to content

fix(swift-sdk): updated the swift integration tests to use the new tx broadcast flow#4037

Merged
ZocoLini merged 1 commit into
v4.1-devfrom
fix/swift-integration-tests
Jul 8, 2026
Merged

fix(swift-sdk): updated the swift integration tests to use the new tx broadcast flow#4037
ZocoLini merged 1 commit into
v4.1-devfrom
fix/swift-integration-tests

Conversation

@ZocoLini

@ZocoLini ZocoLini commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

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

Summary by CodeRabbit

  • Bug Fixes

    • Improved coverage for wallet-to-wallet sends, self-sends, and restart scenarios to better verify transaction handling and balance updates.
  • Tests

    • Updated integration tests to use a simpler send flow for single-recipient transfers.
    • Added support for building and broadcasting a single-output transaction in test wallet utilities.

@github-actions github-actions Bot added this to the v4.1.0 milestone Jul 7, 2026
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0ed1e9fe-b4b2-40e8-8249-b070df15efd6

📥 Commits

Reviewing files that changed from the base of the PR and between 54b3c40 and 663f6b7.

📒 Files selected for processing (4)
  • packages/swift-sdk/SwiftTests/SwiftDashSDKIntegrationTests/Core/CoreSendIntegrationTests.swift
  • packages/swift-sdk/SwiftTests/SwiftDashSDKIntegrationTests/Core/PersisterRestartClassificationIntegrationTests.swift
  • packages/swift-sdk/SwiftTests/SwiftDashSDKIntegrationTests/Core/SpvRestartIntegrationTests.swift
  • packages/swift-sdk/SwiftTests/SwiftDashSDKIntegrationTests/Support/TestWallet.swift

📝 Walkthrough

Walkthrough

A new send(to:amountDuffs:) method is added to TestWalletWrapper that builds, signs, and broadcasts a single-output transaction. Three integration tests are updated to call this new method instead of getCoreWallet().sendToAddresses(...), with corresponding txid derivation adjustments.

Changes

TestWalletWrapper Send Helper Adoption

Layer / File(s) Summary
Add send helper
packages/swift-sdk/SwiftTests/SwiftDashSDKIntegrationTests/Support/TestWallet.swift
Adds send(to:amountDuffs:) using CoreTransactionBuilder to build, sign, and broadcast a single-output transaction from account 0 BIP-44 funding, returning the signed CoreTransaction.
Adopt send helper in tests
packages/swift-sdk/SwiftTests/SwiftDashSDKIntegrationTests/Core/CoreSendIntegrationTests.swift, .../Core/PersisterRestartClassificationIntegrationTests.swift, .../Core/SpvRestartIntegrationTests.swift
Replaces sendToAddresses(recipients:) calls with send(to:amountDuffs:) in three tests, updating txid derivation to use the returned transaction's .data.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • dashpay/platform#3712: Introduced the TestWalletWrapper test harness that this PR extends with the new send(to:amountDuffs:) method.

Suggested labels: Client Only

Suggested reviewers: QuantumExplorer, shumkov

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: Swift integration tests now use the new transaction broadcast flow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/swift-integration-tests

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.

@thepastaclaw

thepastaclaw commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

✅ Review complete (commit 663f6b7)

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

Verified the checked-out PR at 663f6b7. The changes are limited to replacing removed Swift integration-test calls with the current CoreTransactionBuilder plus broadcastTransaction flow, and the helper matches existing Swift wrapper contracts and persisted txid byte order.

Source: Codex gpt-5.5 general reviewer and Codex gpt-5.5 verifier; Claude/opus general reviewer failed due quota (resets Jul 10, 8am America/Chicago); specialists: none.

@ZocoLini ZocoLini merged commit 998734d into v4.1-dev Jul 8, 2026
19 checks passed
@ZocoLini ZocoLini deleted the fix/swift-integration-tests branch July 8, 2026 07:54
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.

3 participants