From 1c625ff268a6dd0f49bc66a6b71ad4b86a4916ae Mon Sep 17 00:00:00 2001 From: ngutech21 Date: Fri, 16 Feb 2024 16:23:31 +0100 Subject: [PATCH] fix: expiry date in quotes is optional --- moksha-core/src/primitives.rs | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/moksha-core/src/primitives.rs b/moksha-core/src/primitives.rs index 53345895..0bc30cf5 100644 --- a/moksha-core/src/primitives.rs +++ b/moksha-core/src/primitives.rs @@ -173,7 +173,7 @@ pub struct PostMintQuoteBolt11Response { #[serde(rename = "request")] pub payment_request: String, pub paid: bool, - pub expiry: u64, + pub expiry: Option, } impl From for PostMintQuoteBolt11Response { @@ -182,7 +182,7 @@ impl From for PostMintQuoteBolt11Response { quote: quote.quote_id.to_string(), payment_request: quote.payment_request, paid: quote.paid, - expiry: quote.expiry, + expiry: Some(quote.expiry), } } } @@ -211,7 +211,7 @@ pub struct PostMeltQuoteBolt11Response { pub amount: u64, pub fee_reserve: u64, pub paid: bool, - pub expiry: u64, + pub expiry: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] @@ -238,7 +238,7 @@ impl From for PostMeltQuoteBolt11Response { quote: quote.quote_id.to_string(), amount: quote.amount, fee_reserve: quote.fee_reserve, - expiry: quote.expiry, + expiry: Some(quote.expiry), paid: quote.paid, } } @@ -379,21 +379,6 @@ pub struct GetMeltOnchainResponse { #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Default, ToSchema)] pub struct Nuts { - // /// Cryptography and Models - // #[serde(rename = "0")] - // pub nut0: bool, - - // /// Mint public keys - // #[serde(rename = "1")] - // pub nut1: bool, - - // /// Keysets and keyset IDs - // #[serde(rename = "2")] - // pub nut2: bool, - - // /// Swapping tokens - // #[serde(rename = "3")] - // pub nut3: bool, /// Minting tokens #[serde(rename = "4")] pub nut4: Nut4,