Skip to content

Commit

Permalink
chore: fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
rolznz committed Mar 16, 2024
1 parent 16f35c0 commit d0605a8
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions src/payment/payment_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,7 @@ impl Readable for PaymentDetails {

if secret.is_some() {
if let Some(lsp_fee_limits) = lsp_fee_limits {
PaymentKind::Bolt11Jit {
hash,
preimage,
secret,
lsp_fee_limits,
}
PaymentKind::Bolt11Jit { hash, preimage, secret, lsp_fee_limits }
} else {
PaymentKind::Bolt11 { hash, preimage, secret, bolt11_invoice: None }
}
Expand Down Expand Up @@ -340,9 +335,9 @@ where
}

payment.last_update = time::SystemTime::now()
.duration_since(time::UNIX_EPOCH)
.unwrap_or(time::Duration::ZERO)
.as_secs();
.duration_since(time::UNIX_EPOCH)
.unwrap_or(time::Duration::ZERO)
.as_secs();

self.persist_info(&update.id, payment)?;
updated = true;
Expand Down Expand Up @@ -553,12 +548,7 @@ mod tests {
);

match bolt11_jit_decoded.kind {
PaymentKind::Bolt11Jit {
hash: h,
preimage: p,
secret: s,
lsp_fee_limits: l,
} => {
PaymentKind::Bolt11Jit { hash: h, preimage: p, secret: s, lsp_fee_limits: l } => {
assert_eq!(hash, h);
assert_eq!(preimage, p);
assert_eq!(secret, s);
Expand Down Expand Up @@ -608,4 +598,3 @@ mod tests {
}
}
}

0 comments on commit d0605a8

Please sign in to comment.