Skip to content

Conversation

@jvsena42
Copy link
Member

Description

  • Fallback to on-chain on unified invoice when Bolt11 is expired
  • Navigation bug when scanning invalid Bolt 11. Was navigating to amount screen even without a valid on-chain address

Linked Issues/Tasks

Fix #300

Screenshot / Video

uniffied-no-amount.mp4
unified-with-amount.mp4
ln-only.mp4

@jvsena42 jvsena42 self-assigned this Jan 12, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the handling of expired Bolt 11 invoices in unified invoices by implementing a fallback to on-chain payment when the Lightning invoice has expired. It also addresses a navigation bug where the app would incorrectly navigate to the amount screen even when scanning an invalid Bolt 11 invoice without a valid on-chain address.

Changes:

  • Added expiration checks for Lightning invoices in unified invoice handling with fallback to on-chain when expired
  • Fixed navigation logic to prevent navigation when no valid invoice data exists
  • Added expiration validation for standalone Lightning invoices

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
Bitkit/ViewModels/AppViewModel.swift Added expiration checks for Lightning invoices with on-chain fallback logic in unified invoice handling
Bitkit/Utilities/PaymentNavigationHelper.swift Changed return type to optional and added validation to prevent navigation without valid invoice data
Bitkit/Views/Wallets/Send/SendEnterManuallyView.swift Updated to handle optional navigation route from PaymentNavigationHelper
Bitkit/Views/Wallets/Send/SendConfirmationView.swift Added expiration check before processing Lightning payments

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.

Expired Lightning in unified invoice fails instead of falling back to Bitcoin address

2 participants