Skip to content

Commit c673150

Browse files
Format code
1 parent 2701976 commit c673150

1 file changed

Lines changed: 21 additions & 7 deletions

File tree

src/lib.rs

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,18 +1030,26 @@ impl MdkNode {
10301030
let invoice_amount = fixed
10311031
.ln_payment_amount()
10321032
.ok_or_else(|| {
1033-
napi::Error::new(Status::InvalidArg, "fixed-amount destination has no lightning amount")
1033+
napi::Error::new(
1034+
Status::InvalidArg,
1035+
"fixed-amount destination has no lightning amount",
1036+
)
10341037
})?
10351038
.milli_sats();
1036-
eprintln!("[lightning-js] fixed-amount destination: {}msat", invoice_amount);
1039+
eprintln!(
1040+
"[lightning-js] fixed-amount destination: {}msat",
1041+
invoice_amount
1042+
);
10371043
(fixed.methods(), invoice_amount)
10381044
}
10391045
PaymentInstructions::ConfigurableAmount(configurable) => {
10401046
// Amount is required for configurable-amount destinations
1041-
let amount_msat = amount_msat
1042-
.ok_or_else(|| {
1043-
napi::Error::new(Status::InvalidArg, "amount_msat is required for variable-amount destinations")
1044-
})?;
1047+
let amount_msat = amount_msat.ok_or_else(|| {
1048+
napi::Error::new(
1049+
Status::InvalidArg,
1050+
"amount_msat is required for variable-amount destinations",
1051+
)
1052+
})?;
10451053
let amount_msat = u64::try_from(amount_msat)
10461054
.ok()
10471055
.filter(|&a| a > 0)
@@ -1050,7 +1058,13 @@ impl MdkNode {
10501058
})?;
10511059

10521060
// Clone and call helper to handle ownership
1053-
return self.resolve_configurable_payment(configurable.clone(), amount_msat, wait_secs, &resolver, &runtime);
1061+
return self.resolve_configurable_payment(
1062+
configurable.clone(),
1063+
amount_msat,
1064+
wait_secs,
1065+
&resolver,
1066+
&runtime,
1067+
);
10541068
}
10551069
};
10561070

0 commit comments

Comments
 (0)