mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-12-24 15:09:35 -05:00
Use VerifiedAmounts
This commit is contained in:
parent
eed5e8e9a4
commit
cc61079826
@ -19,10 +19,10 @@ pub enum Cmd {
|
|||||||
VerifyAmounts(SwapAmounts),
|
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)]
|
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||||
pub enum Rsp {
|
pub enum Rsp {
|
||||||
Verified,
|
VerifiedAmounts,
|
||||||
Abort,
|
Abort,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,6 +37,7 @@ pub struct SwapAmounts {
|
|||||||
pub xmr: xmr_btc::monero::Amount,
|
pub xmr: xmr_btc::monero::Amount,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Display in XMR and BTC (not picos and sats).
|
||||||
impl Display for SwapAmounts {
|
impl Display for SwapAmounts {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
write!(
|
write!(
|
||||||
|
@ -158,7 +158,7 @@ fn verify(amounts: SwapAmounts) -> Rsp {
|
|||||||
return Rsp::Abort;
|
return Rsp::Abort;
|
||||||
}
|
}
|
||||||
|
|
||||||
Rsp::Verified
|
Rsp::VerifiedAmounts
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_yes(s: &str) -> bool {
|
fn is_yes(s: &str) -> bool {
|
||||||
|
Loading…
Reference in New Issue
Block a user