Repository navigation
fix: restore the ios build after the funding read merge - #1519
Conversation
refreshFundingSeen awaited a sync noteFundingSeen and noteFundingSeen returned a value from a Void function after merging #1506 over the noteFundingSeen refactor. Read the UTXOs first, note them, return them. Verified: xcodebuild test SparkExitReviewTests + OnchainSendAttemptServiceTests (pass), swiftformat --lint
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Low impact] The PR appears safe to merge. SummaryFixes the funding-read compile errors in
Reviews (1) · Last reviewed commit: "fix: restore the ios build after the fun..." · Reviewed by Greptile |
|
QA for b8a9920: Tested on iPhone 17 Pro (iOS 27 simulator), local regtest, with a plain build of this head. The only local change points the app at the local regtest ports. 🟢 Force transfer with savings that fall shortForce transfer with savings that fall short With 5 000 sats in savings, the emergency fees (₿ 20 825) had to come from another wallet. The pay screen showed the amount to pay and the funding address. Another wallet paid it. The exit started, and Progress showed no amount left to pay, so the funding address read worked. One block later, Confirmation of emergency fees was ticked and the exit broadcast its next step. Every tick read the address without errors.
|
talosmachina
left a comment
There was a problem hiding this comment.
No findings. Restores the build after #1506 merged over #1449: refreshFundingSeen reads the UTXOs, notes them through the now synchronous noteFundingSeen, and returns them. Reviewed b8a9920, light tier, static (iOS does not build on this reviewer's Linux host).
What I checked, and 2 candidates I ruled out
Read: SparkExitManager.swift around refreshFundingSeen / noteFundingSeen, plus both callers of the returned value (the refused-payment retry guard at refreshFundingSeen(...) != nil, and the discardable tick calls).
Compared: the result against c9c612807, the #1506 side, which inlined the same read, note and return; the merged result matches it line for line.
CI: SwiftFormat, validate and Greptile green; Run Tests, Run Integration Tests and build-local still pending at review time.
Ruled out
- Nil versus empty on an unreadable address:
try? awaitstill yields nil, so the retry guard still refuses to pay when the address cannot be read. - The other
noteFundingSeen(_:)overload (pre-start,[EsploraUtxo]only): untouched, and the call sites resolve to the two-argument private one.
Merge confidence: 4/5, the change is mechanical but the unit and build jobs had not finished when this was posted.
Reviewer model: claude-opus-5-5
Reasoning effort: Not exposed (the run metadata available to this reviewer does not carry an effort setting)
piotr-iohk
left a comment
There was a problem hiding this comment.
QA review
Scope: full PR diff against its merge base, at b8a9920.
No new actionable code findings.
No actionable code findings. The PR changes one function. refreshFundingSeen now reads the funding-address UTXOs, passes them to the synchronous noteFundingSeen, and returns them. The result matches the #1506 side of the merge (c9c6128) line for line, so behaviour is unchanged. An address that cannot be read still gives nil, so the refused-savings retry still throws instead of paying without a read. The two tick callers ignore the return value, and the pre-start noteFundingSeen(_:) overload is untouched.
Validation: I compiled a small stand-in for the two functions (not the real file) with Swift 6.4.2 on Linux. The base shape fails with "unexpected non-void return value in void function" and the head shape type-checks cleanly. This is not a full app build. The unit tests and the build-local / e2e run passed on this exact head. Android has no equivalent of this merge-induced compile break, so I did no parity comparison.
Device testing: not performed in this review. The author reports a simulator force-transfer pass at this head where another wallet paid the funding (QA comment).
Suggested additional test cases
- iOS unit test: put a refused savings payment on an exit that still needs funding, and give it a chain stub whose
utxos(address:)throws. Retry the payment. Expected: it throws the "funding address could not be read" error and makes no payment attempt. I found no existing test that asserts this guard.
Reviewer model: claude-opus-5-5
Reasoning effort: high
@piotr-iohk Good call. The guard came in with #1506, so I'm adding that test in #1518, which changes |
Summary
master stopped compiling after #1506 merged over the
noteFundingSeenchange from #1449:refreshFundingSeenawaited the now synchronousnoteFundingSeen.noteFundingSeenreturned the UTXOs from aVoidfunction.refreshFundingSeennow reads the UTXOs first, notes them, and returns them. Behaviour is unchanged.Test
SparkExitReviewTestsandOnchainSendAttemptServiceTestspass.swiftformat --lintis clean.Android is unaffected, so there is no twin.
Models used
Claude Opus 5.5(reasoning:medium)Gemini 4 Neon(reasoning:high)