mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-11-17 15:26:14 +00:00
Remove unused structs
This commit is contained in:
parent
2dbd43e2c0
commit
73c52ffb61
@ -1,7 +1,3 @@
|
|||||||
use crate::monero;
|
|
||||||
use bitcoin::hashes::core::{fmt, fmt::Display};
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
pub mod alice;
|
pub mod alice;
|
||||||
pub mod bob;
|
pub mod bob;
|
||||||
|
|
||||||
@ -10,26 +6,3 @@ pub struct StartingBalances {
|
|||||||
pub xmr: crate::monero::Amount,
|
pub xmr: crate::monero::Amount,
|
||||||
pub btc: bitcoin::Amount,
|
pub btc: bitcoin::Amount,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// XMR/BTC swap amounts.
|
|
||||||
#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq)]
|
|
||||||
pub struct SwapAmounts {
|
|
||||||
/// Amount of BTC to swap.
|
|
||||||
#[serde(with = "::bitcoin::util::amount::serde::as_sat")]
|
|
||||||
pub btc: bitcoin::Amount,
|
|
||||||
/// Amount of XMR to swap.
|
|
||||||
#[serde(with = "monero::monero_amount")]
|
|
||||||
pub xmr: crate::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!(
|
|
||||||
f,
|
|
||||||
"{} sats for {} piconeros",
|
|
||||||
self.btc.as_sat(),
|
|
||||||
self.xmr.as_piconero()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user