Skip to content

Commit afd4bd2

Browse files
committed
Fix PaymentInfo deserialize error
1 parent afcb0b3 commit afd4bd2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mutiny-core/src/event.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ pub struct PaymentInfo {
3232
pub secret: Option<[u8; 32]>,
3333
pub status: HTLCStatus,
3434
#[serde(skip_serializing_if = "MillisatAmount::is_none")]
35+
#[serde(default)]
3536
pub amt_msat: MillisatAmount,
3637
#[serde(skip_serializing_if = "Option::is_none")]
3738
pub fee_paid_msat: Option<u64>,
@@ -44,7 +45,7 @@ pub struct PaymentInfo {
4445
pub last_update: u64,
4546
}
4647

47-
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
48+
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
4849
pub struct MillisatAmount(pub Option<u64>);
4950

5051
impl MillisatAmount {

0 commit comments

Comments
 (0)