From: benthecarman Date: Thu, 23 Mar 2023 05:06:32 +0000 (-0500) Subject: Add generic InvoiceDescription to invoice in InvoiceBuilder X-Git-Tag: v0.0.115~54^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=18c3318b780a60035fad10334fc95141542f4d44;p=rust-lightning Add generic InvoiceDescription to invoice in InvoiceBuilder --- 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 {