You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wow-btc-swap/swap/src/asb/fixed_rate.rs

21 lines
382 B

use crate::asb::Rate;
#[derive(Clone, Copy, Debug)]
pub struct FixedRate(Rate);
impl FixedRate {
pub const RATE: f64 = 0.01;
pub fn value(&self) -> Rate {
self.0
}
}
impl Default for FixedRate {
fn default() -> Self {
let ask = bitcoin::Amount::from_btc(Self::RATE).expect("Static value should never fail");
Self(Rate::new(ask))
}
}