[wallet_redesign] Update Wallet with redesigned structures

This commit is contained in:
志宇 committed 2023-06-04 03:32:14 +08:00
1 parent 8641847e6c
commit e69fccb15f
9 files changed
+757 -528

No files matched your search

+12
View File
@@ -137,6 +137,18 @@ impl ConfirmationTime {
}
}
impl From<ObservedAs<ConfirmationTimeAnchor>> for ConfirmationTime {
fn from(observed_as: ObservedAs<ConfirmationTimeAnchor>) -> Self {
match observed_as {
ObservedAs::Confirmed(a) => Self::Confirmed {
height: a.confirmation_height,
time: a.confirmation_time,
},
ObservedAs::Unconfirmed(_) => Self::Unconfirmed,
}
}
}
/// A reference to a block in the canonical chain.
#[derive(Debug, Clone, PartialEq, Eq, Copy, PartialOrd, Ord, core::hash::Hash)]
#[cfg_attr(