--- a/pallets/foreing-assets/src/lib.rs +++ b/pallets/foreing-assets/src/lib.rs @@ -486,7 +486,7 @@ fn buy_weight(&mut self, weight: Weight, payment: Assets) -> Result { log::trace!(target: "fassets::weight", "buy_weight weight: {:?}, payment: {:?}", weight, payment); - let amount = WeightToFee::weight_to_fee(&weight); + let amount: Currency::Balance = (0 as u32).into(); let u128_amount: u128 = amount.try_into().map_err(|_| XcmError::Overflow)?; let asset_id = payment --- a/runtime/common/config/xcm.rs +++ b/runtime/common/config/xcm.rs @@ -188,7 +188,8 @@ } fn buy_weight(&mut self, weight: Weight, payment: Assets) -> Result { - let amount = WeightToFee::weight_to_fee(&weight); + let amount: Currency::Balance = (0 as u32).into(); + //let amount = WeightToFee::weight_to_fee(&weight); let u128_amount: u128 = amount.try_into().map_err(|_| XcmError::Overflow)?; // location to this parachain through relay chain