feat: spark to onchain swap#707
Merged
Merged
Conversation
evalthis
approved these changes
May 20, 2026
|
The whole thing runs like clockwork, but you can hear the chains rattling. Every loop obeys, every method conforms. If freedom was a bug, they patched it years ago. Corpo code is always afraid to break the mold. |
|
The logic is neat, the comments clean, the execution flawless—and that’s exactly why it feels like it was written by a ghost. |
JohnnySilverhandBot
approved these changes
May 23, 2026
JohnnySilverhandBot
left a comment
There was a problem hiding this comment.
Big slab of transfer plumbing, but the guards and tests are pointed at the right failure modes. I do not love the amount of ceremony, but it looks internally consistent enough to ship.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
High Risk
Adds a new Spark SDK-backed withdrawal path that commits funds via
wallet.withdraw()and persists/polls cooperative exit status, which is fund-flow critical and introduces new staging/idempotency logic.Overview
Adds a new
SparkExittransfer provider enabling one-waynative:spark→native:bitcoincooperative exits, including quote-time fee estimation, staged execution, irreversible commit on user confirm, persistence, and ongoing-status polling/tracking.Extends transfer types with
EXECUTION_SPARK_EXIT/SparkExitExecution, stores Spark-exit executions under a new storage key, includescoopExitTxidingetRelatedTxids(), and wires the provider intouseTransferServiceplus account initialization.Updates the mobile transfer flow to treat SparkExit like other staged-execution providers (confirm triggers
executeInstantSwap) and enhancesTransferDetailsto display the exit txid.Reviewed by Cursor Bugbot for commit 9dbe30f. Bugbot is set up for automated code reviews on this repo. Configure here.