git.delta.rocks / unique-network / refs/commits / 6fb8930110f8

difftreelog

Set XCM incoming transaction fee amount to 0.

Ilja Khabarov2022-08-25parent: #0dac160.patch.diff
in: master

2 files changed

modifiedpallets/foreing-assets/src/lib.rsdiffbeforeafterboth
--- 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<Assets, XcmError> {
 		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
modifiedruntime/common/config/xcm.rsdiffbeforeafterboth
188 }188 }
189189
190 fn buy_weight(&mut self, weight: Weight, payment: Assets) -> Result<Assets, XcmError> {190 fn buy_weight(&mut self, weight: Weight, payment: Assets) -> Result<Assets, XcmError> {
191 let amount = WeightToFee::weight_to_fee(&weight);191 let amount: Currency::Balance = (0 as u32).into();
192 //let amount = WeightToFee::weight_to_fee(&weight);
192 let u128_amount: u128 = amount.try_into().map_err(|_| XcmError::Overflow)?;193 let u128_amount: u128 = amount.try_into().map_err(|_| XcmError::Overflow)?;
193194
194 // location to this parachain through relay chain195 // location to this parachain through relay chain