refactor(swift-sdk): promote the testnet faucet client into the SDK package#4098
Conversation
…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>
|
Warning Review limit reached
Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
✅ Review complete (commit 29d9325) |
thepastaclaw
left a comment
There was a problem hiding this comment.
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.
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.swift→Sources/SwiftDashSDK/Utils/TestnetFaucet.swift(95% rename), renaming the type toTestnetFaucetand 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?
Breaking Changes
None for the SDK (additive API). Within SwiftExampleApp the type moved/renamed, which is app-internal.
Checklist:
For repository code-owners and collaborators only
🤖 Generated with Claude Code