diff --git a/mm2src/coins/eth.rs b/mm2src/coins/eth.rs index cba9ece714..9cae50c63c 100644 --- a/mm2src/coins/eth.rs +++ b/mm2src/coins/eth.rs @@ -2131,11 +2131,13 @@ impl MarketCoinOps for EthCoin { } } + #[inline] fn min_tx_amount(&self) -> BigDecimal { BigDecimal::from(0) } + #[inline] fn min_trading_vol(&self) -> MmNumber { - let pow = self.decimals / 3; - MmNumber::from(1) / MmNumber::from(10u64.pow(pow as u32)) + let pow = self.decimals as u32; + MmNumber::from(1) / MmNumber::from(10u64.pow(pow)) } } diff --git a/mm2src/coins/qrc20.rs b/mm2src/coins/qrc20.rs index c99f2d47b7..b094146be5 100644 --- a/mm2src/coins/qrc20.rs +++ b/mm2src/coins/qrc20.rs @@ -1270,11 +1270,13 @@ impl MarketCoinOps for Qrc20Coin { fn display_priv_key(&self) -> Result { utxo_common::display_priv_key(&self.utxo) } + #[inline] fn min_tx_amount(&self) -> BigDecimal { BigDecimal::from(0) } + #[inline] fn min_trading_vol(&self) -> MmNumber { - let pow = self.utxo.decimals / 3; - MmNumber::from(1) / MmNumber::from(10u64.pow(pow as u32)) + let pow = self.utxo.decimals as u32; + MmNumber::from(1) / MmNumber::from(10u64.pow(pow)) } } diff --git a/mm2src/coins/tendermint/tendermint_coin.rs b/mm2src/coins/tendermint/tendermint_coin.rs index 33e48d1885..911d3ed6bb 100644 --- a/mm2src/coins/tendermint/tendermint_coin.rs +++ b/mm2src/coins/tendermint/tendermint_coin.rs @@ -2394,9 +2394,11 @@ impl MarketCoinOps for TendermintCoin { .to_string()) } + #[inline] fn min_tx_amount(&self) -> BigDecimal { big_decimal_from_sat(MIN_TX_SATOSHIS, self.decimals) } - fn min_trading_vol(&self) -> MmNumber { MmNumber::from("0.00777") } + #[inline] + fn min_trading_vol(&self) -> MmNumber { self.min_tx_amount().into() } } #[async_trait] diff --git a/mm2src/coins/tendermint/tendermint_token.rs b/mm2src/coins/tendermint/tendermint_token.rs index f985ccec3c..bfae306b32 100644 --- a/mm2src/coins/tendermint/tendermint_token.rs +++ b/mm2src/coins/tendermint/tendermint_token.rs @@ -594,10 +594,11 @@ impl MarketCoinOps for TendermintToken { fn display_priv_key(&self) -> Result { self.platform_coin.display_priv_key() } + #[inline] fn min_tx_amount(&self) -> BigDecimal { big_decimal_from_sat(MIN_TX_SATOSHIS, self.decimals) } - /// !! This function includes dummy implementation for P.O.C work - fn min_trading_vol(&self) -> MmNumber { MmNumber::from("0.00777") } + #[inline] + fn min_trading_vol(&self) -> MmNumber { self.min_tx_amount().into() } } #[async_trait]