This repository was archived by the owner on Feb 3, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ pub struct MutinyInvoice {
117117 payee_pubkey : Option < String > ,
118118 pub amount_sats : Option < u64 > ,
119119 pub expire : u64 ,
120+ pub expired : bool ,
120121 status : String ,
121122 pub fees_paid : Option < u64 > ,
122123 pub inbound : bool ,
@@ -181,6 +182,7 @@ impl From<mutiny_core::MutinyInvoice> for MutinyInvoice {
181182 }
182183 None => false ,
183184 } ;
185+ let now = utils:: now ( ) . as_secs ( ) ;
184186 MutinyInvoice {
185187 bolt11 : m. bolt11 ,
186188 description : m. description ,
@@ -189,6 +191,7 @@ impl From<mutiny_core::MutinyInvoice> for MutinyInvoice {
189191 payee_pubkey : m. payee_pubkey . map ( |p| p. to_hex ( ) ) ,
190192 amount_sats : m. amount_sats ,
191193 expire : m. expire ,
194+ expired : m. expire < now,
192195 status : m. status . to_string ( ) ,
193196 fees_paid : m. fees_paid ,
194197 inbound : m. inbound ,
You can’t perform that action at this time.
0 commit comments