From 63eb0d9541af59f946b6dd86e5c5e9fe6f5fc860 Mon Sep 17 00:00:00 2001 From: dmoka Date: Mon, 23 Sep 2024 11:43:08 +0200 Subject: [PATCH] renaming --- pallets/dca/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pallets/dca/src/lib.rs b/pallets/dca/src/lib.rs index f05c771c8..b230239cd 100644 --- a/pallets/dca/src/lib.rs +++ b/pallets/dca/src/lib.rs @@ -1135,17 +1135,17 @@ impl Pallet { fn convert_native_amount_to_currency( asset_id: T::AssetId, - asset_amount: Balance, + native_asset_amount: Balance, ) -> Result { let amount = if asset_id == T::NativeAssetId::get() { - asset_amount + native_asset_amount } else if T::SwappablePaymentAssetSupport::is_transaction_fee_currency(asset_id) { let price = T::NativePriceOracle::price(asset_id).ok_or(Error::::CalculatingPriceError)?; - multiply_by_rational_with_rounding(asset_amount, price.n, price.d, Rounding::Up) + multiply_by_rational_with_rounding(native_asset_amount, price.n, price.d, Rounding::Up) .ok_or(ArithmeticError::Overflow)? } else { - let fee_amount_in_dot = Self::convert_to_polkadot_native_asset(asset_amount)?; + let fee_amount_in_dot = Self::convert_to_polkadot_native_asset(native_asset_amount)?; T::SwappablePaymentAssetSupport::calculate_in_given_out( asset_id, T::PolkadotNativeAssetId::get(),