From 56bff5f5325aabd08774b614dd3edba96cebccd1 Mon Sep 17 00:00:00 2001 From: Ignacio Palacios Date: Fri, 1 Mar 2024 17:38:52 +0100 Subject: [PATCH] Backport of #3340 - Fix `DepositReserveAsset` (#3545) Backport of https://github.com/paritytech/polkadot-sdk/pull/3340 It was backported to `v1.7.0` but changes didn't make it to `v1.8.0` --- polkadot/xcm/xcm-executor/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/polkadot/xcm/xcm-executor/src/lib.rs b/polkadot/xcm/xcm-executor/src/lib.rs index b26779f3ae9d..a305b19f2888 100644 --- a/polkadot/xcm/xcm-executor/src/lib.rs +++ b/polkadot/xcm/xcm-executor/src/lib.rs @@ -827,8 +827,10 @@ impl XcmExecutor { let to_weigh = self.holding.saturating_take(assets.clone()); self.holding.subsume_assets(to_weigh.clone()); + let to_weigh_reanchored = Self::reanchored(to_weigh, &dest, None); + let mut message_to_weigh = - vec![ReserveAssetDeposited(to_weigh.into()), ClearOrigin]; + vec![ReserveAssetDeposited(to_weigh_reanchored), ClearOrigin]; message_to_weigh.extend(xcm.0.clone().into_iter()); let (_, fee) = validate_send::(dest.clone(), Xcm(message_to_weigh))?;