Skip to content

Merge staging-spark into master - #4339

Open
thisconnect wants to merge 191 commits into
masterfrom
staging-spark
Open

Merge staging-spark into master#4339
thisconnect wants to merge 191 commits into
masterfrom
staging-spark

Conversation

@thisconnect

@thisconnect thisconnect commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Before asking for reviews, here is a check list of the most common things you might need to consider:

  • updating the Changelog
  • writing unit tests
  • checking if your changes affect other coins or tokens in unintended ways
  • testing on multiple environments (Qt, Android, ...)
  • having an AI review your changes

beerosagos and others added 30 commits March 25, 2026 09:38
This is a new draft implementation of a Spark-based Lightning wallet.
It basically collapses all the development done on the old staging-ln
branch, plus a Spark PoC integration that replaces the old Greenlight
one. It is not perfect: there are a lot of things that still need to
be refactored, but I thought that it makes sense to have a starting
point now and to open small, specific PRs from now on in this new
staging branch.
Conflicts:
	backend/config/config.go
Additional change:
        lightning.tsx -> update payment struct to use NativeCoinUnit
We used to expose the lightning config struct to the whole backend and
the frontend. This adds specific methods to set/unset a lightning
account and remove the complexity from the code where is not needed.
- move payment-related types and methods into payments.go
- hide breez-specific request/response shapes behind app-facing types
- remove unused lightning endpoints and dead backend/frontend code
- drop query-string dep from the lightning frontend api
- refactor api/lightning.ts to use types instead of interfaces
 Conflicts:
	frontends/web/src/api/coins.ts
	frontends/web/src/components/forms/index.tsx
	frontends/web/src/components/sidebar/sidebar.tsx
	frontends/web/src/contexts/providers.tsx
	frontends/web/src/routes/account/summary/balancerow.tsx
Activating a lightning account (especially a previously activated one)
could take several seconds. This adds a waiting screen to clearly
indicate that the wallet is being created.
Lightning icon centering in the sidebar was wrong. This fixes it using
flex centering to bring it onto the same vertical alignment as the other
sidebar icons. This also adds limits to the icon size.
The LN account was only shown in the wide screen sidebar.
This adds it on the accounts view for mobile/tablet as well.
The current frontend send flow is long and complicated, hard to read and
to maintain. This refactors it, making it more modular and introducing a
dedicated context/provider that allows keeping track of the flow status
while splitting the differents parts.
 Conflicts:
	frontends/web/src/api/account.ts
	frontends/web/src/routes/accounts/all-accounts.tsx
Status component renamed the dismissible field to dismissibleKey. This
commit adapts the code to the change after the merge of master branch.
During the previous merge commit I didn't remove the unitClassName param
from AccountRow in all-accounts.tsx. Now it's fixed.
Split Lightning payment quoting from payment submission
across the backend and web send flow.

Add a prepare-payment API that returns the amount, fee,
and total debit before sending. Pass the approved fee back
on send, reject stale approvals in the backend, and refresh
the quote in the UI when the SDK requires a new approval.
Lightning payments were just drafted in the frontend: the backend was
providing a DTO object that wasn't matching the frontend representation
and was lacking the amounts' fiat conversions. This fixes it by creating
a dedicated lightning payment component in the frontend and adapting the
data returned by the backend.
Co-authored-by: beerosagos <luca@bitbox.swiss>
Beerosagos and others added 15 commits August 19, 2026 11:08
Lightning balances were fetched only when a view loaded,
so the view could keep showing a stale balance after a
payment was received.

Publish balance notifications from the backend whenever
the balance or its displayed value changes, and consume
them with useSync wherever the frontend displays a
Lightning balance. This preserves the initial load
while keeping the current view updated as the balance
changes.
Accept BIP21 URIs in the Lightning send flow and use their address,
amount and message for on-chain payments.

Prefer embedded BOLT11 invoices over the on-chain fallback. Preserve the
invoice description when present. Otherwise, show the BIP21 message as
the payment note.

Cover on-chain, amountless and hybrid inputs with parser tests.

Co-authored-by: beerosagos <luca@bitbox.swiss>
- revamp QR scanner
- use this QR scanner in 3 places: onchain send, LN send, and
WalletConnect scan
- add paste button on receiver input

Co-authored-by: thisconnect <this@shiftcrypto.ch>
conflict: frontends/web/src/routes/account/account.module.css
BackButton component should be used for back buttons to enable back
navigation gestures on iOS and Android.

Also enables back navigation for the QR scanner.
@thisconnect

Copy link
Copy Markdown
Collaborator Author

changelog entry missing :)

@thisconnect
thisconnect marked this pull request as ready for review August 20, 2026 08:22
@thisconnect
thisconnect requested a review from a team as a code owner August 20, 2026 08:22
@thisconnect

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review skipped: 243 files exceed the limit of 100.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@thisconnect
thisconnect requested review from benma and bznein and removed request for benma and bznein August 20, 2026 10:08
@thisconnect

Copy link
Copy Markdown
Collaborator Author

this should fix the new conflicts #4341 cc @sutterseba

Conflicts:
	CHANGELOG.md
	frontends/web/src/app.tsx
	frontends/web/src/components/bottom-navigation/bottom-navigation.tsx
	frontends/web/src/components/bottom-navigation/utils.test.ts
	frontends/web/src/components/bottom-navigation/utils.ts
	frontends/web/src/routes/router.tsx
@thisconnect
thisconnect requested a review from Beerosagos August 20, 2026 19:39
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.

9 participants