Skip to content

Commit

Permalink
Merge pull request #1065 from getlipa/mock-deps_add-lnurlp-comment
Browse files Browse the repository at this point in the history
Mock lnurlp comment
  • Loading branch information
gcomte authored May 13, 2024
2 parents 79f989d + a2799c4 commit c52eab8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion mock/breez-sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ impl BreezServices {
destination_pubkey: parsed_invoice.payee_pubkey,
bolt11: req.bolt11,
lnurl_pay_domain: None,
lnurl_pay_comment: None,
ln_address: None,
lnurl_metadata: None,
lnurl_withdraw_endpoint: None,
Expand Down Expand Up @@ -325,6 +326,7 @@ impl BreezServices {
destination_pubkey: PAYEE_PUBKEY_DUMMY.to_string(),
bolt11: BOLT11_DUMMY.to_string(),
lnurl_pay_domain: Some(req.data.domain.clone()),
lnurl_pay_comment: req.comment.clone(),
ln_address: req.data.ln_address.clone(),
lnurl_metadata: Some(req.data.metadata_str.clone()),
lnurl_withdraw_endpoint: None,
Expand Down Expand Up @@ -365,6 +367,7 @@ impl BreezServices {
destination_pubkey: NODE_PUBKEY.clone(),
bolt11: bolt11.clone(),
lnurl_pay_domain: None,
lnurl_pay_comment: None,
ln_address: None,
lnurl_metadata: None,
lnurl_withdraw_endpoint: Some("https://lnurl.dummy.com/lnurl-withdraw".to_string()),
Expand Down Expand Up @@ -471,6 +474,7 @@ impl BreezServices {
destination_pubkey: NODE_PUBKEY.to_string(),
bolt11: invoice.to_string(),
lnurl_pay_domain: None,
lnurl_pay_comment: None,
ln_address: None,
lnurl_metadata: None,
lnurl_withdraw_endpoint: None,
Expand Down Expand Up @@ -646,6 +650,7 @@ impl BreezServices {
destination_pubkey: NODE_PUBKEY.to_string(),
bolt11: swap.clone().bolt11.unwrap_or_default(),
lnurl_pay_domain: None,
lnurl_pay_comment: None,
ln_address: None,
lnurl_metadata: None,
lnurl_withdraw_endpoint: None,
Expand Down Expand Up @@ -826,6 +831,7 @@ impl BreezServices {
destination_pubkey: PAYEE_PUBKEY_DUMMY.to_string(),
bolt11: BOLT11_DUMMY.to_string(),
lnurl_pay_domain: None,
lnurl_pay_comment: None,
ln_address: None,
lnurl_metadata: None,
lnurl_withdraw_endpoint: None,
Expand Down Expand Up @@ -961,6 +967,7 @@ impl BreezServices {
destination_pubkey: PAYEE_PUBKEY_DUMMY.to_string(),
bolt11: swap.bolt11.clone().unwrap_or(BOLT11_DUMMY.to_string()),
lnurl_pay_domain: None,
lnurl_pay_comment: None,
ln_address: None,
lnurl_metadata: None,
lnurl_withdraw_endpoint: None,
Expand Down Expand Up @@ -1026,6 +1033,7 @@ impl BreezServices {
destination_pubkey: PAYEE_PUBKEY_DUMMY.to_string(),
bolt11: BOLT11_DUMMY.to_string(),
lnurl_pay_domain: None,
lnurl_pay_comment: None,
ln_address,
lnurl_metadata: None,
lnurl_withdraw_endpoint: None,
Expand Down Expand Up @@ -1129,6 +1137,7 @@ struct MockPayment {
destination_pubkey: String,
bolt11: String,
lnurl_pay_domain: Option<String>,
lnurl_pay_comment: Option<String>,
ln_address: Option<String>,
lnurl_metadata: Option<String>,
lnurl_withdraw_endpoint: Option<String>,
Expand Down Expand Up @@ -1159,7 +1168,7 @@ fn create_payment(p: MockPayment) -> Payment {
open_channel_bolt11: None,
lnurl_success_action: None,
lnurl_pay_domain: p.lnurl_pay_domain,
lnurl_pay_comment: None,
lnurl_pay_comment: p.lnurl_pay_comment,
ln_address: p.ln_address,
lnurl_metadata: p.lnurl_metadata,
lnurl_withdraw_endpoint: p.lnurl_withdraw_endpoint,
Expand Down

0 comments on commit c52eab8

Please sign in to comment.