-
Notifications
You must be signed in to change notification settings - Fork 1
fix: fallback expired Bolt 11 to on-chain on unified invoice #320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 |
Description
Linked Issues/Tasks
Fix #300
Screenshot / Video
uniffied-no-amount.mp4
unified-with-amount.mp4
ln-only.mp4