This is where these types are used, they can be defined in there.pull/394/head
parent
654cfff2a8
commit
3e0301a9d4
@ -1,7 +1,5 @@
|
||||
pub mod command;
|
||||
pub mod config;
|
||||
mod fixed_rate;
|
||||
mod rate;
|
||||
|
||||
pub use self::fixed_rate::FixedRate;
|
||||
pub use self::rate::Rate;
|
||||
pub use rate::Rate;
|
||||
|
@ -1,20 +0,0 @@
|
||||
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))
|
||||
}
|
||||
}
|
Loading…
Reference in new issue