Skip to content
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

BIP21 Supporting both lightning and payjoin displays as though both are enabled #854

Closed
DanGould opened this issue Jan 27, 2024 · 0 comments · Fixed by #855
Closed

BIP21 Supporting both lightning and payjoin displays as though both are enabled #854

DanGould opened this issue Jan 27, 2024 · 0 comments · Fixed by #855

Comments

@DanGould
Copy link

DanGould commented Jan 27, 2024

But only 1 is possible. Perhaps we fix with logic that tries to pay lightning and falls back only on chain balance is available / payment fails?

See the logic here that enables labels independently an allows them to conflict if both are present:

function handleDestination(source: ParsedParams | undefined) {
if (!source) return;
setParsingDestination(true);
setOriginalScan(source.original);
try {
if (source.address) setAddress(source.address);
if (source.payjoin_enabled)
setPayjoinEnabled(source.payjoin_enabled);
if (source.memo) setDescription(source.memo);
if (source.contact_id) setContactId(source.contact_id);
if (source.invoice) {
processInvoice(source as ParsedParams & { invoice: string });
} else if (source.node_pubkey) {

image

https://x.com/satscoffee/status/1751064339769851916?s=20

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 a pull request may close this issue.

1 participant