From 6fb8930110f829cd02594650e8bda306ee040385 Mon Sep 17 00:00:00 2001 From: Ilja Khabarov Date: Thu, 25 Aug 2022 15:00:48 +0000 Subject: [PATCH] Set XCM incoming transaction fee amount to 0. --- --- 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 -- gitstuff