From cc6107982600212906e978868f5605767142990e Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 22 Oct 2020 13:55:50 +1100 Subject: [PATCH] Use VerifiedAmounts --- swap/src/lib.rs | 5 +++-- swap/src/main.rs | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/swap/src/lib.rs b/swap/src/lib.rs index ad67aca7..404e9177 100644 --- a/swap/src/lib.rs +++ b/swap/src/lib.rs @@ -19,10 +19,10 @@ pub enum Cmd { VerifyAmounts(SwapAmounts), } -/// Responses send from the main task back to Bob. +/// Responses sent from the main task back to Bob. #[derive(Clone, Copy, Debug, PartialEq)] pub enum Rsp { - Verified, + VerifiedAmounts, Abort, } @@ -37,6 +37,7 @@ pub struct SwapAmounts { pub xmr: xmr_btc::monero::Amount, } +// TODO: Display in XMR and BTC (not picos and sats). impl Display for SwapAmounts { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( diff --git a/swap/src/main.rs b/swap/src/main.rs index ce6ea418..5a62120d 100644 --- a/swap/src/main.rs +++ b/swap/src/main.rs @@ -158,7 +158,7 @@ fn verify(amounts: SwapAmounts) -> Rsp { return Rsp::Abort; } - Rsp::Verified + Rsp::VerifiedAmounts } fn is_yes(s: &str) -> bool {