From 18c3318b780a60035fad10334fc95141542f4d44 Mon Sep 17 00:00:00 2001 From: benthecarman Date: Thu, 23 Mar 2023 00:06:32 -0500 Subject: [PATCH] Add generic InvoiceDescription to invoice in InvoiceBuilder --- lightning-invoice/src/lib.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lightning-invoice/src/lib.rs b/lightning-invoice/src/lib.rs index 37c74922e..1421c48b4 100644 --- a/lightning-invoice/src/lib.rs +++ b/lightning-invoice/src/lib.rs @@ -611,6 +611,18 @@ impl InvoiceBuilder InvoiceBuilder { + match description { + InvoiceDescription::Direct(desc) => { + self.description(desc.clone().into_inner()) + } + InvoiceDescription::Hash(hash) => { + self.description_hash(hash.0) + } + } + } } impl InvoiceBuilder { -- 2.39.5