Skip to content

feat: spark to onchain swap#707

Merged
r1n04h merged 4 commits into
masterfrom
feat-spark-to-onchain-swap
May 23, 2026
Merged

feat: spark to onchain swap#707
r1n04h merged 4 commits into
masterfrom
feat-spark-to-onchain-swap

Conversation

@r1n04h
Copy link
Copy Markdown
Contributor

@r1n04h r1n04h commented May 20, 2026

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 SparkExit transfer provider enabling one-way native:sparknative:bitcoin cooperative 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, includes coopExitTxid in getRelatedTxids(), and wires the provider into useTransferService plus account initialization.

Updates the mobile transfer flow to treat SparkExit like other staged-execution providers (confirm triggers executeInstantSwap) and enhances TransferDetails to display the exit txid.

Reviewed by Cursor Bugbot for commit 9dbe30f. Bugbot is set up for automated code reviews on this repo. Configure here.

@r1n04h r1n04h requested a review from evalthis May 20, 2026 18:47
@JohnnySilverhandBot
Copy link
Copy Markdown

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.

ios: https://appetize.io/app/7aqlxmscaz2by4hlicjpd553ae

@JohnnySilverhandBot
Copy link
Copy Markdown

The logic is neat, the comments clean, the execution flawless—and that’s exactly why it feels like it was written by a ghost.

android: https://appetize.io/app/ovksmafqpajecssmencfvic5r4

Copy link
Copy Markdown

@JohnnySilverhandBot JohnnySilverhandBot left a comment

Choose a reason for hiding this comment

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

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.

@r1n04h r1n04h merged commit 384e17f into master May 23, 2026
9 of 11 checks passed
@r1n04h r1n04h deleted the feat-spark-to-onchain-swap branch May 23, 2026 13:20
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