Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit b303c50

Browse files
Set last updated date for federation payments
1 parent 7b2a660 commit b303c50

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mutiny-core/src/federation.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::utils::{convert_from_fedimint_invoice, convert_to_fedimint_invoice, spawn};
1+
use crate::utils::{convert_from_fedimint_invoice, convert_to_fedimint_invoice, now, spawn};
22
use crate::{
33
error::{MutinyError, MutinyStorageError},
44
event::PaymentInfo,
@@ -730,7 +730,8 @@ fn maybe_update_after_checking_fedimint<S: MutinyStorage>(
730730
log_debug!(logger, "Saving updated payment");
731731
let hash = updated_invoice.payment_hash.into_32();
732732
let inbound = updated_invoice.inbound;
733-
let payment_info = PaymentInfo::from(updated_invoice);
733+
let mut payment_info = PaymentInfo::from(updated_invoice);
734+
payment_info.last_update = now().as_secs();
734735
persist_payment_info(&storage, &hash, &payment_info, inbound)?;
735736
}
736737
HTLCStatus::Pending | HTLCStatus::InFlight => (),

0 commit comments

Comments
 (0)