From ad9282dab82e631e9ad6bc4dff5c30632bcbe621 Mon Sep 17 00:00:00 2001 From: Restioson Date: Fri, 25 Aug 2023 16:48:00 +0200 Subject: [PATCH] fixup! Insert Payment into database when invoice is created --- crates/ln-dlc-node/src/node/invoice.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/crates/ln-dlc-node/src/node/invoice.rs b/crates/ln-dlc-node/src/node/invoice.rs index 0975910fe..d5e41a12d 100644 --- a/crates/ln-dlc-node/src/node/invoice.rs +++ b/crates/ln-dlc-node/src/node/invoice.rs @@ -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)