LN-Zap / zap-android

Zap Wallet - Native android lightning wallet for node operators focused on user experience and ease of use ⚡️
MIT License
165 stars 49 forks source link

Bip21 - lightning parameter support #273

Closed michaelWuensch closed 3 years ago

michaelWuensch commented 3 years ago

Description

This PR adds support for classical bip21 style bitcoin invoices which include a lightning invoice by adding the "lightning=lnbc..." parameter. If the appended lightning invoice is invalid or the user does not have enough channel balance to pay it, when scanned, the on-chain dialog will automatically shown. Otherwhise, the lightning dialog is automatically displayed. If the lightning payment fails, the user is given the possibility to fall back to on-chain payment.

The design does not look perfect yet. The whole bottom sheets need a refactoring, but that is something for a different PR.

Motivation and Context

Make Zap more versatile. Fix issue #269.

Types of changes

Checklist: