use crate::movements::Movement;
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)]
#[serde(tag = "type", rename_all = "kebab-case")]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub enum WalletNotification {
MovementCreated {
movement: Movement,
},
MovementUpdated {
movement: Movement,
},
ChannelLagging,
}
impl From<bark::WalletNotification> for WalletNotification {
fn from(v: bark::WalletNotification) -> Self {
match v {
bark::WalletNotification::MovementCreated { movement } => {
WalletNotification::MovementCreated { movement: movement.into() }
},
bark::WalletNotification::MovementUpdated { movement } => {
WalletNotification::MovementUpdated { movement: movement.into() }
},
bark::WalletNotification::ChannelLagging => WalletNotification::ChannelLagging,
}
}
}