mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-16 00:53:58 -05:00
parent
3e0301a9d4
commit
a99d12b9df
6 changed files with 109 additions and 20 deletions
|
|
@ -96,6 +96,10 @@ impl Amount {
|
|||
Self::from_decimal(decimal)
|
||||
}
|
||||
|
||||
pub fn as_piconero_decimal(&self) -> Decimal {
|
||||
Decimal::from(self.as_piconero())
|
||||
}
|
||||
|
||||
fn from_decimal(amount: Decimal) -> Result<Self> {
|
||||
let piconeros_dec =
|
||||
amount.mul(Decimal::from_u64(PICONERO_OFFSET).expect("constant to fit into u64"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue