mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 13:54:20 +01:00
Fix parseInput handling
This commit is contained in:
@@ -51,9 +51,9 @@ do {
|
||||
let lnurlPayUrl = "lightning@address.com";
|
||||
|
||||
try {
|
||||
const input = await parseInput(lnurlAuthUrl)
|
||||
const input = await parseInput(lnurlPayUrl)
|
||||
if (input.type === InputType.LNURL_PAY) {
|
||||
const amountSats = input.minSendable;
|
||||
const amountSats = input.data.minSendable;
|
||||
const result = await payLnurl(input.data, amountSats, "comment")
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
@@ -51,9 +51,9 @@ do {
|
||||
let lnurlWithdrawUrl = "lnurl1dp68gurn8ghj7mr0vdskc6r0wd6z7mrww4exctthd96xserjv9mn7um9wdekjmmw843xxwpexdnxzen9vgunsvfexq6rvdecx93rgdmyxcuxverrvcursenpxvukzv3c8qunsdecx33nzwpnvg6ryc3hv93nzvecxgcxgwp3h33lxk";
|
||||
|
||||
try {
|
||||
const input = await parseInput(lnurlAuthUrl)
|
||||
const input = await parseInput(lnurlWithdrawUrl)
|
||||
if (input.type === InputType.LNURL_WITHDRAW) {
|
||||
const amountSats = input.minWithdrawable;
|
||||
const amountSats = input.data.minWithdrawable;
|
||||
const result = await withdrawLnurl(input.data, amountSats, "comment")
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user