File tree 2 files changed +14
-5
lines changed 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -166,10 +166,10 @@ mod tests {
166
166
. create_invoice ( CreateInvoiceParams {
167
167
invoice_type : InvoiceType :: Bolt11 ,
168
168
amount_msats : Some ( amount_msats) ,
169
- offer : None ,
170
169
description : Some ( description. clone ( ) ) ,
171
170
description_hash : Some ( description_hash. clone ( ) ) ,
172
171
expiry : Some ( expiry) ,
172
+ ..Default :: default ( )
173
173
} )
174
174
. await
175
175
{
@@ -189,11 +189,8 @@ mod tests {
189
189
match NODE
190
190
. create_invoice ( CreateInvoiceParams {
191
191
invoice_type : InvoiceType :: Bolt11 ,
192
- amount_msats : None ,
193
- offer : None ,
194
- description : None ,
195
- description_hash : None ,
196
192
expiry : Some ( expiry) ,
193
+ ..Default :: default ( )
197
194
} )
198
195
. await
199
196
{
Original file line number Diff line number Diff line change @@ -218,6 +218,18 @@ pub struct CreateInvoiceParams {
218
218
pub description_hash : Option < String > ,
219
219
pub expiry : Option < i64 > ,
220
220
}
221
+ impl Default for CreateInvoiceParams {
222
+ fn default ( ) -> Self {
223
+ Self {
224
+ invoice_type : InvoiceType :: Bolt11 ,
225
+ amount_msats : None ,
226
+ offer : None ,
227
+ description : None ,
228
+ description_hash : None ,
229
+ expiry : None ,
230
+ }
231
+ }
232
+ }
221
233
222
234
// Pay Code aka BOLT12 Offer
223
235
#[ cfg_attr( feature = "napi_rs" , napi( object) ) ]
You can’t perform that action at this time.
0 commit comments