Skip to content

Commit

Permalink
Reorder inconsistent arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
slanesuke committed Aug 7, 2024
1 parent 95e58f3 commit 93c706b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bindings/ldk_node.udl
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ interface Bolt12Payment {
[Throws=NodeError]
PaymentId send([ByRef]Offer offer, u64? quantity, string? payer_note);
[Throws=NodeError]
PaymentId send_using_amount([ByRef]Offer offer, string? payer_note, u64 amount_msat, u64? quantity);
PaymentId send_using_amount([ByRef]Offer offer, u64 amount_msat, string? payer_note, u64? quantity);
[Throws=NodeError]
Offer receive(u64 amount_msat, [ByRef]string description);
[Throws=NodeError]
Expand Down
2 changes: 1 addition & 1 deletion src/payment/bolt12.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ impl Bolt12Payment {
/// If `payer_note` is `Some` it will be seen by the recipient and reflected back in the invoice
/// response.
pub fn send_using_amount(
&self, offer: &Offer, payer_note: Option<String>, amount_msat: u64, quantity: Option<u64>,
&self, offer: &Offer, amount_msat: u64, payer_note: Option<String>, quantity: Option<u64>,
) -> Result<PaymentId, Error> {
let rt_lock = self.runtime.read().unwrap();
if rt_lock.is_none() {
Expand Down
6 changes: 3 additions & 3 deletions tests/integration_tests_rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,11 +467,11 @@ fn simple_bolt12_send_receive() {
let offer = node_b.bolt12_payment().receive(offer_amount_msat, "asdf").unwrap();
assert!(node_a
.bolt12_payment()
.send_using_amount(&offer, None, None, less_than_offer_amount)
.send_using_amount(&offer, less_than_offer_amount, None, None)
.is_err());
let payment_id = node_a
.bolt12_payment()
.send_using_amount(&offer, None, None, expected_amount_msat)
.send_using_amount(&offer, expected_amount_msat, None, None)
.unwrap();

expect_payment_successful_event!(node_a, Some(payment_id), None);
Expand Down Expand Up @@ -511,7 +511,7 @@ fn simple_bolt12_send_receive() {

// Now node_b refunds the amount node_a just overpaid.
let overpaid_amount = expected_amount_msat - offer_amount_msat;
let refund = node_b.bolt12_payment().initiate_refund(overpaid_amount, None, 3600).unwrap();
let refund = node_b.bolt12_payment().initiate_refund(overpaid_amount, 3600, None).unwrap();
let invoice = node_a.bolt12_payment().request_refund_payment(&refund).unwrap();
expect_payment_received_event!(node_a, overpaid_amount);

Expand Down

0 comments on commit 93c706b

Please sign in to comment.