From 299d4c9c0583a4e0bc8ed2c60fe30a5b0b8c6120 Mon Sep 17 00:00:00 2001 From: thesimplekid Date: Mon, 18 Dec 2023 22:55:26 +0000 Subject: [PATCH] refactor: rename proof to payment_preimage --- crates/cashu/src/nuts/nut05.rs | 2 +- crates/cashu/src/nuts/nut08.rs | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/crates/cashu/src/nuts/nut05.rs b/crates/cashu/src/nuts/nut05.rs index ef25356a..4fccd2b3 100644 --- a/crates/cashu/src/nuts/nut05.rs +++ b/crates/cashu/src/nuts/nut05.rs @@ -52,7 +52,7 @@ pub struct MeltBolt11Response { /// Indicate if payment was successful pub paid: bool, /// Bolt11 preimage - pub payment_preimage: String, + pub payment_preimage: Option, } /// Melt Settings diff --git a/crates/cashu/src/nuts/nut08.rs b/crates/cashu/src/nuts/nut08.rs index b395e2d4..cff8ac91 100644 --- a/crates/cashu/src/nuts/nut08.rs +++ b/crates/cashu/src/nuts/nut08.rs @@ -14,7 +14,7 @@ pub struct MeltBolt11Request { /// Proofs pub inputs: Proofs, /// Blinded Message that can be used to return change [NUT-08] - /// Amount field of blindedMessages `SHOULD` be set to zero + /// Amount field of BlindedMessages `SHOULD` be set to zero pub outputs: Option>, } @@ -31,12 +31,11 @@ impl MeltBolt11Request { } /// Melt Response [NUT-08] -/// Lightning fee return [NUT-08] if change is defined +/// Lightning fee return [NUT-08] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct MeltBolt11Response { pub paid: bool, - // REVIEW: https://github.com/cashubtc/nuts/pull/55#discussion_r1419991818 - pub proof: String, + pub payment_preimage: Option, pub change: Option>, }