Skip to content

Commit

Permalink
fixup! Insert Payment into database when invoice is created
Browse files Browse the repository at this point in the history
  • Loading branch information
Restioson committed Aug 25, 2023
1 parent cd4d64c commit ad9282d
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions crates/ln-dlc-node/src/node/invoice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,7 @@ where

self.storage.insert_payment(
payment_hash,
PaymentInfo {
preimage: Some(
self.channel_manager
.get_payment_preimage(payment_hash, payment_secret)
.map_err(|_| anyhow!("Failed to get payment preimage for new invoice"))?,
),
..invoice.clone().into()
},
invoice.clone().into(),
)?;

Ok(invoice)
Expand Down

0 comments on commit ad9282d

Please sign in to comment.