Skip to content

Commit

Permalink
Apply lnurl_pay param reorder changes to test cases
Browse files Browse the repository at this point in the history
run cargo fmt
  • Loading branch information
erdemyerebasmaz committed Oct 19, 2023
1 parent 4ab5fc6 commit abeb31f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
5 changes: 1 addition & 4 deletions libs/sdk-bindings/src/uniffi_binding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,7 @@ impl BlockingBreezServices {
)
}

pub fn receive_payment(
&self,
req: ReceivePaymentRequest,
) -> SdkResult<ReceivePaymentResponse> {
pub fn receive_payment(&self, req: ReceivePaymentRequest) -> SdkResult<ReceivePaymentResponse> {
rt().block_on(self.breez_services.receive_payment(req))
}

Expand Down
14 changes: 7 additions & 7 deletions libs/sdk-core/src/lnurl/pay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ mod tests {

let mock_breez_services = crate::breez_services::tests::breez_services().await?;
match mock_breez_services
.lnurl_pay(user_amount_sat, Some(comment), pay_req)
.lnurl_pay(pay_req, user_amount_sat, Some(comment))
.await?
{
LnUrlPayResult::EndpointSuccess { data: None } => Ok(()),
Expand Down Expand Up @@ -848,7 +848,7 @@ mod tests {

let mock_breez_services = crate::breez_services::tests::breez_services().await?;
let r = mock_breez_services
.lnurl_pay(user_amount_sat, Some(comment), pay_req)
.lnurl_pay(pay_req, user_amount_sat, Some(comment))
.await;
// An unsupported Success Action results in an error
assert!(r.is_err());
Expand All @@ -873,7 +873,7 @@ mod tests {

let mock_breez_services = crate::breez_services::tests::breez_services().await?;
match mock_breez_services
.lnurl_pay(user_amount_sat, Some(comment), pay_req)
.lnurl_pay(pay_req, user_amount_sat, Some(comment))
.await?
{
LnUrlPayResult::EndpointSuccess { data: None } => Err(anyhow!(
Expand Down Expand Up @@ -906,7 +906,7 @@ mod tests {

let mock_breez_services = crate::breez_services::tests::breez_services().await?;
assert!(mock_breez_services
.lnurl_pay(user_amount_sat, Some(comment), pay_req)
.lnurl_pay(pay_req, user_amount_sat, Some(comment))
.await
.is_err());

Expand All @@ -931,7 +931,7 @@ mod tests {

let mock_breez_services = crate::breez_services::tests::breez_services().await?;
let res = mock_breez_services
.lnurl_pay(user_amount_sat, Some(comment), pay_req)
.lnurl_pay(pay_req, user_amount_sat, Some(comment))
.await;
assert!(matches!(res, Ok(LnUrlPayResult::EndpointError { data: _ })));

Expand Down Expand Up @@ -963,7 +963,7 @@ mod tests {

let mock_breez_services = crate::breez_services::tests::breez_services().await?;
match mock_breez_services
.lnurl_pay(user_amount_sat, Some(comment), pay_req)
.lnurl_pay(pay_req, user_amount_sat, Some(comment))
.await?
{
LnUrlPayResult::EndpointSuccess {
Expand Down Expand Up @@ -1031,7 +1031,7 @@ mod tests {
)
.await?;
match mock_breez_services
.lnurl_pay(user_amount_sat, Some(comment), pay_req)
.lnurl_pay(pay_req, user_amount_sat, Some(comment))
.await?
{
LnUrlPayResult::EndpointSuccess {
Expand Down

0 comments on commit abeb31f

Please sign in to comment.