Skip to content

Commit

Permalink
Correct the input of lnurlWithdraw
Browse files Browse the repository at this point in the history
lnurlPayUrl -> lnurlWithdrawUrl
  • Loading branch information
erdemyerebasmaz committed Oct 25, 2023
1 parent ae4bc95 commit 2953917
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions snippets/dart_snippets/lib/lnurl_withdraw.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import 'package:breez_sdk/bridge_generated.dart';

Future<void> lnurlWithdraw() async {
// ANCHOR: lnurl-withdraw
/// Endpoint can also be of the form:
/// lnurlp://domain.com/lnurl-pay?key=val
/// lnurl1dp68gurn8ghj7mr0vdskc6r0wd6z7mrww4excttsv9un7um9wdekjmmw84jxywf5x43rvv35xgmr2enrxanr2cfcvsmnwe3jxcukvde48qukgdec89snwde3vfjxvepjxpjnjvtpxd3kvdnxx5crxwpjvyunsephsz36jf
String lnurlPayUrl = "[email protected]";
// Endpoint can also be of the form:
// lnurlw://domain.com/lnurl-withdraw?key=val
String lnurlWithdrawUrl =
"lnurl1dp68gurn8ghj7mr0vdskc6r0wd6z7mrww4exctthd96xserjv9mn7um9wdekjmmw843xxwpexdnxzen9vgunsvfexq6rvdecx93rgdmyxcuxverrvcursenpxvukzv3c8qunsdecx33nzwpnvg6ryc3hv93nzvecxgcxgwp3h33lxk";

InputType inputType = await BreezSDK().parseInput(input: lnurlPayUrl);
InputType inputType = await BreezSDK().parseInput(input: lnurlWithdrawUrl);
if (inputType is InputType_LnUrlWithdraw) {
int amountMsat = inputType.data.minWithdrawable;
LnUrlWithdrawRequest req = LnUrlWithdrawRequest(
Expand Down

0 comments on commit 2953917

Please sign in to comment.