diff --git a/Cargo.toml b/Cargo.toml index aa4638e..4954bd2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mostro-core" -version = "0.6.5" +version = "0.6.6" edition = "2021" license = "MIT" authors = ["Francisco Calderón "] diff --git a/src/dispute.rs b/src/dispute.rs index 6baeaed..f7a1062 100644 --- a/src/dispute.rs +++ b/src/dispute.rs @@ -62,6 +62,8 @@ pub struct Dispute { pub solver_pubkey: Option, pub created_at: i64, pub taken_at: i64, + pub buyer_token: Option, + pub seller_token: Option, } impl Dispute { @@ -73,6 +75,8 @@ impl Dispute { solver_pubkey: None, created_at: Utc::now().timestamp(), taken_at: 0, + buyer_token: None, + seller_token: None, } } } diff --git a/src/lib.rs b/src/lib.rs index dfab3df..7fcec80 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -53,6 +53,8 @@ mod test { None, Some(1627371434), None, + None, + None, ))), )); let sample_message = r#"{"order":{"version":1,"id":"308e1272-d5f4-47e6-bd97-3504baea9c23","pubkey":null,"action":"new-order","content":{"order":{"id":"308e1272-d5f4-47e6-bd97-3504baea9c23","kind":"sell","status":"pending","amount":100,"fiat_code":"eur","fiat_amount":100,"payment_method":"SEPA","premium":1,"created_at":1627371434}}}}"#; @@ -87,6 +89,8 @@ mod test { None, Some(1627371434), None, + None, + None )), "lnbcrt78510n1pj59wmepp50677g8tffdqa2p8882y0x6newny5vtz0hjuyngdwv226nanv4uzsdqqcqzzsxqyz5vqsp5skn973360gp4yhlpmefwvul5hs58lkkl3u3ujvt57elmp4zugp4q9qyyssqw4nzlr72w28k4waycf27qvgzc9sp79sqlw83j56txltz4va44j7jda23ydcujj9y5k6k0rn5ms84w8wmcmcyk5g3mhpqepf7envhdccp72nz6e".to_string(), None, diff --git a/src/message.rs b/src/message.rs index 318cbc4..b1c978e 100644 --- a/src/message.rs +++ b/src/message.rs @@ -195,7 +195,7 @@ pub enum Content { Peer(Peer), RatingUser(u8), Amount(Amount), - Dispute(Uuid), + Dispute(Uuid, Option), } #[allow(dead_code)] diff --git a/src/order.rs b/src/order.rs index 86efce7..a6fa4c0 100644 --- a/src/order.rs +++ b/src/order.rs @@ -164,6 +164,8 @@ impl Order { self.buyer_invoice.clone(), Some(self.created_at), Some(self.expires_at), + None, + None, ) } @@ -194,6 +196,8 @@ pub struct SmallOrder { pub buyer_invoice: Option, pub created_at: Option, pub expires_at: Option, + pub buyer_token: Option, + pub seller_token: Option, } #[allow(dead_code)] @@ -215,6 +219,8 @@ impl SmallOrder { buyer_invoice: Option, created_at: Option, expires_at: Option, + buyer_token: Option, + seller_token: Option, ) -> Self { Self { id, @@ -232,6 +238,8 @@ impl SmallOrder { buyer_invoice, created_at, expires_at, + buyer_token, + seller_token, } } /// New order from json string