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
486 fn buy_weight(&mut self, weight: Weight, payment: Assets) -> Result<Assets, XcmError> {486 fn buy_weight(&mut self, weight: Weight, payment: Assets) -> Result<Assets, XcmError> {
487 log::trace!(target: "fassets::weight", "buy_weight weight: {:?}, payment: {:?}", weight, payment);487 log::trace!(target: "fassets::weight", "buy_weight weight: {:?}, payment: {:?}", weight, payment);
488488
489 let amount = WeightToFee::weight_to_fee(&weight);489 let amount: Currency::Balance = (0 as u32).into();
490 let u128_amount: u128 = amount.try_into().map_err(|_| XcmError::Overflow)?;490 let u128_amount: u128 = amount.try_into().map_err(|_| XcmError::Overflow)?;
491491
492 let asset_id = payment492 let asset_id = payment
modifiedruntime/common/config/xcm.rsdiffbeforeafterboth
--- 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<Assets, XcmError> {
-		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