Skip to content

refactor(swift-sdk): promote the testnet faucet client into the SDK package#4098

Merged
QuantumExplorer merged 1 commit into
v4.1-devfrom
refactor/sdk-testnet-faucet
Jul 12, 2026
Merged

refactor(swift-sdk): promote the testnet faucet client into the SDK package#4098
QuantumExplorer merged 1 commit into
v4.1-devfrom
refactor/sdk-testnet-faucet

Conversation

@QuantumExplorer

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

The testnet faucet client (faucet.thepasta.org HTTP client + cap.js proof-of-work solver) lived inside SwiftExampleApp, so other SDK consumers (dashwallet-ios QA builds in particular) couldn't reuse it. dashwallet-ios has been carrying this promotion on its platform pin branch; upstreaming it shrinks the pin.

What was done?

Moved SwiftExampleApp/Core/Services/TestnetFaucetService.swiftSources/SwiftDashSDK/Utils/TestnetFaucet.swift (95% rename), renaming the type to TestnetFaucet and adjusting access levels for the package boundary. Pure code motion — no behavior change; testnet-only tooling, never invoked on mainnet paths.

How Has This Been Tested?

  • SwiftExampleApp builds for the iOS simulator on this branch (both the SDK package and the app's existing faucet call sites compile).
  • The promoted client is exercised regularly from dashwallet-ios QA builds on the pin branch (funding testnet wallets via the in-app faucet button).

Breaking Changes

None for the SDK (additive API). Within SwiftExampleApp the type moved/renamed, which is app-internal.

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

🤖 Generated with Claude Code

…ackage

Moves TestnetFaucet + CapSolver from SwiftExampleApp into
Sources/SwiftDashSDK/Utils so dashwallet-ios can drive the faucet
in-app without carrying a drifting copy. Public API unchanged
(TestnetFaucet().requestCoreDash, TestnetFaucet.webURL); the example
app picks it up through its existing SwiftDashSDK import.

Also folds in the example-app fallout from the fee-threading change:
sendDashPayPayment returns (txid, feeDuffs) now, so
SendDashPayPaymentSheet destructures the tuple.

Both apps build; live-verified against faucet.thepasta.org
(challenge -> solve -> redeem -> /api/core-faucet 200, txid 395eeb08...).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@QuantumExplorer, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b8677735-edb5-41c2-895c-00f548af36fb

📥 Commits

Reviewing files that changed from the base of the PR and between 9c75a1c and 29d9325.

📒 Files selected for processing (1)
  • packages/swift-sdk/Sources/SwiftDashSDK/Utils/TestnetFaucet.swift
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/sdk-testnet-faucet

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 12, 2026

Copy link
Copy Markdown
Collaborator

✅ Review complete (commit 29d9325)

@github-actions github-actions Bot added this to the v4.1.0 milestone Jul 12, 2026
@QuantumExplorer
QuantumExplorer merged commit 0ba6a71 into v4.1-dev Jul 12, 2026
17 checks passed
@QuantumExplorer
QuantumExplorer deleted the refactor/sdk-testnet-faucet branch July 12, 2026 09:44

@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

Clean, mechanical promotion of the testnet faucet client from SwiftExampleApp into the SwiftDashSDK package. Only access-level modifiers and doc comments changed; no logic was altered, and the sole call site already compiles against the new public API. No blocking, suggestion, or nitpick issues found.

Source: reviewers gpt-5.6-sol (Sol reviewer) + claude-sonnet-5; verifier claude-sonnet-5.

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