Skip to content

chore(breez): remove the Breez Liquid SDK and its Spark migration - #754

Merged
islandbitcoin merged 3 commits into
mainfrom
jabariennis/remove-breez-liquid-sdk
Oct 5, 2026
Merged

islandbitcoin merged 3 commits into
mainfrom
jabariennis/remove-breez-liquid-sdk

Conversation

@islandbitcoin

@islandbitcoin islandbitcoin commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

This removes the Breez SDK - Liquid from the app, along with the one feature that used it: moving a phone's old Liquid balance to Spark at launch.

Breez has retired the Liquid SDK, and its GitHub repos now return 404. CocoaPods can no longer download BreezSDKLiquid or breez_sdk_liquidFFI, so every fresh iOS pod install fails. That has turned the iOS Build Check red on every PR since 4 October. #753 tried a mirror of the pods; this PR replaces it by removing the dependency.

What changes

  • Deleted:
    • the migration (app/utils/breez-sdk/migration.ts) and its popup (app/components/spark-migration-modal/);
    • the Liquid wrapper (app/utils/breez-sdk-liquid/);
    • the migration doc (spark-migration.md). This PR carries out its cleanup list, apart from the init guard (kept, see below) and two steps outside the code: the .env key (see Ops) and launching the app (see Before release);
    • the patch-package patch for the Liquid package.
  • BreezProvider: no longer runs the migration after Spark starts. Its init guard stays, because it also stops overlapping starts.
  • Removed: sparkMigrationCompleted from the persisted-state type and from wallet import, and MIGRATION_FEE_LNURL_W from the env declaration and its test mock. Phones that saved the flag keep it, unused.
  • Dependency: @breeztech/react-native-breez-sdk-liquid is gone. yarn.lock and Podfile.lock lose only its entries; the three Liquid pods take the total from 151 to 148. Also removed: two app header search paths pointing at its pod.
  • README: the Breez section now names the Spark SDK. Its feature list loses the Liquid line, three lines about node management, payment channels and channel backups, and a WebLN line. The node and channel lines described the old node-based Breez SDK; Spark runs no node and no channels on the phone. WebLN isn't a Spark SDK feature, and nothing in app/ imports it.

For anyone who never migrated

The app no longer sees or moves an old Liquid balance. Migration status is stored only on the phone, so we can't count who is left. Their coins stay under the recovery phrase that the Liquid and Spark wallets share, and support can recover them by importing that phrase into a Liquid wallet. That works only while the phrase exists.

The app can delete the phrase before anyone backs it up. It keeps the phrase on the phone and deletes it, without checking backedUpBtcWallet, on logout, on the automatic logout after three wrong PINs, on account deletion, and when another phrase is imported. Until now, an advanced-mode launch tried to move the old balance and, when the move failed, showed it in an error ("Your liquid wallet balance is N sats"). After this PR nothing in the app mentions the Liquid balance. A user whose coins sit in Liquid sees only their Spark balance, which may be 0, and has no reason to back up. If they log out before backing up, those coins are lost.

A one-time "back up your phrase or contact support" notice would close this gap. Whether to add one is a product call for a separate PR. To reach everyone below, it belongs where the migration used to run: after Spark starts in getBreezInfo, keyed on the same saved sparkMigrationCompleted flag, with Import Wallet resetting the flag as it used to.

Also affected: a Liquid-era phrase brought to any phone by Import Wallet or QR sign-in. Both used to start the migration and now show only the Spark balance. Import Wallet set sparkMigrationCompleted to false, so the app ran the migration on the imported phrase. QR sign-in, offered only on the login screen, writes the phrase and turns on advanced mode, and on a phone with no saved flag, such as a fresh install or one that has logged out, the missing flag started the migration. A user who moves phones by QR sign-in and then resets the old phone keeps the only copy of the phrase on the new one, where the deletion paths above apply.

An iOS reinstall likely does the same. iOS normally keeps Keychain items after an app is deleted, nothing in the app clears the saved phrase on a fresh install, and "Show Bitcoin account" in settings turns on advanced mode with any saved phrase, on a phone that now has no saved flag. That comes from reading the code; it wasn't tried on a phone.

Also affected: upgraders who hid the Bitcoin account. The migration ran only in advanced mode, and "Hide Bitcoin account" keeps the phrase. These users never ran the migration and never saw their Liquid balance in an error. Showing the account again used to start the migration; now it shows only the Spark balance.

A 7→8 step in state-migrations.ts keyed on isAdvanceMode && sparkMigrationCompleted !== true would reach none of these. It skips upgraders who hid the Bitcoin account. That step runs once, when the upgraded app first loads its saved state, before the user can do any of the above, and a fresh install has no saved state for it to run on.

Verified

  • Tests: yarn tsc:check is clean. The full Jest suite passed before the new spec was added: 158 suites, 1,855 tests. Lint (changed lines), prettier on the new and edited code, typos and check:translations are all clean. Prettier still flags README.md and __mocks__/@env.js, as it did on main; they weren't reformatted here.
  • New __tests__/contexts/breez-provider.spec.tsx: a phone that never finished the migration starts the BTC wallet like any other. That means:
    • Spark starts once and the balance is read once;
    • no alert is shown, and only the balance is saved;
    • with advanced mode off, nothing starts.
  • Mutation checks: each test fails when that behaviour is put back. Bringing back the second balance read or the old migration call fails the first test; starting Spark with advanced mode off fails the second.
  • pod install ran against the updated lockfiles and removed exactly the three Liquid pods. Before that, jetify and patch-package were re-run: yarn remove --ignore-scripts had dropped the Geetest patch, which briefly changed an unrelated pod.
  • iOS simulator build, run locally: a Debug build for the simulator succeeded at 74e8291, the last commit that touches code (Xcode 26.6, iPhone 17, iOS 26.5). It ran the Hermes "Replace Hermes" phase that fails in CI, then compiled and linked the app, so the project.pbxproj and Podfile.lock edits build. The built app has 0 matches for the Breez Liquid SDK's symbol names and 3,236 for the Spark SDK's, which shows the search finds SDK symbols. The app was not launched.

Not verified

  • Nobody has launched either app with this change. The Android Build Check compiles the Android app and is the only native CI check here that can fail.
  • The iOS Build Check can't tell us whether the iOS app builds. It pipes xcodebuild into xcpretty without pipefail. Since at least 25 September, main's runs have logged ** BUILD FAILED ** at the Hermes "Replace Hermes" script phase and still passed. This PR's first run did the same: job 111561718120 installed 148 pods, failed at that phase and passed. Adding pipefail here would turn this PR red on a failure main already has, so set -o pipefail and the Hermes fix belong together in a separate PR.

Before merge

  • Android Build Check green on the head commit: c2fb644, run 37249089240, where assembleDebug built the app and uploaded the debug APK.

Before release

  • Recovery path: derive one test phrase's addresses with the Breez Liquid SDK and with the wallet support will point users to, and confirm they match.
  • Ops handbook: write that recovery procedure into the handbook. It should tell support that a BTC balance of 0, or lower than the user expects, can mean the phrase still holds Liquid funds, including right after Import Wallet, QR sign-in, an iOS reinstall, or showing a hidden Bitcoin account, and to check that phrase with the recovery path.
  • Launch both apps: build and launch on an iOS simulator and on an Android device, starting from saved state {isAdvanceMode: true, sparkMigrationCompleted: false}, and record the result under Verified.

Ops

  • Retire the fee-refund link. MIGRATION_FEE_LNURL_W is the LNURL-withdraw link the migration used to refund swap fees, and this PR removes its last use. Disable or empty it on the server, and remove the key from the DOT_ENV secret, which android-deploy.yml, ios-deploy.yml and ios-alt-deploy.yml write to .env. Installed builds don't need it to finish a migration: a failed refund still marks the migration complete and shows a "contact support" message for the fee.

Rollback

Revert this PR. The pods can then come from the mirror in #753's branch (jabariennis/ios-breez-liquid-pod-mirror) and lnflash/breez-sdk-liquid-swift, both kept for that purpose.

🤖 Generated with Claude Code

Dread and others added 3 commits October 4, 2026 18:50
Breez has retired the Breez SDK - Liquid, and its GitHub repos now return
404. CocoaPods can no longer download BreezSDKLiquid or
breez_sdk_liquidFFI, so every fresh iOS `pod install` fails. The app used
the SDK for one job only: moving a phone's old Liquid balance to Spark at
launch. Take the Liquid side out.

- Delete the migration (`app/utils/breez-sdk/migration.ts`), its popup,
  the Liquid wrapper (`app/utils/breez-sdk-liquid/`), the migration doc
  and the patch-package patch for the Liquid package.
- BreezProvider no longer runs the migration after Spark starts. Its init
  guard stays, since it also stops overlapping starts.
- Drop `sparkMigrationCompleted` from the persisted-state type and from
  wallet import, and `MIGRATION_FEE_LNURL_W` from the env declaration and
  its test mock. Phones that saved the flag keep it, unused.
- Remove `@breeztech/react-native-breez-sdk-liquid`. yarn.lock and
  Podfile.lock lose only its entries (three pods). Also drop two app
  header search paths that pointed at its pod, and the README mention.
- Add a BreezProvider test: a phone that never finished the migration
  starts the BTC wallet like any other, with one balance read, no alert,
  and only the balance saved.

A phone that never finished the migration no longer sees or moves its
Liquid balance in the app. The coins stay under the same recovery phrase,
which the Liquid and Spark wallets share.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Breez SDK list now names the Spark SDK, but three of its bullets
(node management, payment channels, channel backups) described the old
node-based Breez SDK. Spark runs no node and no channels on the phone,
so those lines sent the next maintainer looking for code that doesn't
exist.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review fix. The Breez SDK list still said the SDK enables "WebLN standard
support for web application integration". WebLN isn't a Spark SDK
feature, and nothing in app/ imports webln or react-native-webln, so the
line sent the next maintainer looking for code that doesn't exist, as the
node and channel bullets did.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@islandbitcoin
islandbitcoin merged commit 5e27390 into main Oct 5, 2026
9 checks passed
islandbitcoin pushed a commit that referenced this pull request Oct 5, 2026
Replaces the static flashcard.png with the Flash Card physical design
(Concept A, Bearer) as vector art: app/components/flashcard-v2-art/
cardArtV2.tsx is a byte-for-byte copy of flash-pos's card face, and the
parity spec pins the file's SHA-256, the node digest and the rendered
trees so the two apps cannot drift without a test failing. The card is
drawn in flow (centred, 10 dp above, 16 dp below) instead of the old
PNG's absolute placement, so the balance and the action row sit where
they did on main. In dark mode a 1 dp outline keeps the near-black card
visible on the black page. The accessibility label says the card's
masked id letter by letter ("Flashcard ending 0 C 6 7"); the printed id
derives from the pubkey's last four hex digits as in flash-pos.

FLASH, BEARER CARD and ₿ are outlined Inter glyph paths; the bundled
Sora fonts and those glyphs are credited in THIRD_PARTY_NOTICES.md. The
shared file keeps flash-pos's Prettier style through a self-contained
override. New i18n key FlashcardV2.cardEnding; translations regenerated.

Rebased onto main after #748-#754; the branch's own copy of #748's
action-row move was dropped in favour of main's.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
islandbitcoin added a commit that referenced this pull request Oct 6, 2026
* feat(flashcard): draw the Bearer card on the Cashu card screen

Replaces the static flashcard.png with the Flash Card physical design
(Concept A, Bearer) as vector art: app/components/flashcard-v2-art/
cardArtV2.tsx is a byte-for-byte copy of flash-pos's card face, and the
parity spec pins the file's SHA-256, the node digest and the rendered
trees so the two apps cannot drift without a test failing. The card is
drawn in flow (centred, 10 dp above, 16 dp below) instead of the old
PNG's absolute placement, so the balance and the action row sit where
they did on main. In dark mode a 1 dp outline keeps the near-black card
visible on the black page. The accessibility label says the card's
masked id letter by letter ("Flashcard ending 0 C 6 7"); the printed id
derives from the pubkey's last four hex digits as in flash-pos.

FLASH, BEARER CARD and ₿ are outlined Inter glyph paths; the bundled
Sora fonts and those glyphs are credited in THIRD_PARTY_NOTICES.md. The
shared file keeps flash-pos's Prettier style through a self-contained
override. New i18n key FlashcardV2.cardEnding; translations regenerated.

Rebased onto main after #748-#754; the branch's own copy of #748's
action-row move was dropped in favour of main's.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* feat(flashcard): draw the Bearer card as the home row's thumbnail

The home screen's Cashu card row used the BoltCard's flag icon. It now shows
the Flashcard v2 art (FlashcardV2Art) at the icon's width, without the card
screen's drop shadow, and hidden from screen readers: the row's title and
amount already say what it is. `Balance` takes an optional `iconNode` to
draw in place of its icon; the BoltCard row keeps its icon.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Dread <[email protected]>
Co-authored-by: Claude Fable 5.1 <[email protected]>
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.

1 participant