Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscoaguirre committed Jan 26, 2024
1 parent 1c827db commit 9368692
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions polkadot/xcm/xcm-executor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -659,9 +659,9 @@ impl<Config: config::Config> XcmExecutor<Config> {
self.holding.subsume_assets(to_weigh.clone());

let mut message_to_weigh =
vec![WithdrawAsset(to_weigh.clone()), ClearOrigin];
vec![WithdrawAsset(to_weigh.clone().into()), ClearOrigin];
message_to_weigh.extend(xcm.0.clone().into_iter());
let (_, fee) = validate_send::<Config::XcmSender>(dest, Xcm(message_to_weigh))?;
let (_, fee) = validate_send::<Config::XcmSender>(reserve, Xcm(message_to_weigh))?;
// set aside fee to be charged by XcmSender
let parked_fee = self.holding.saturating_take(fee.into());

Expand All @@ -683,11 +683,11 @@ impl<Config: config::Config> XcmExecutor<Config> {
},
InitiateTeleport { assets, dest, xcm } => {
// We must do this first in order to resolve wildcards.
let to_weigh = self.holding.saturating_take(assets);
let to_weigh = self.holding.saturating_take(assets.clone());
self.holding.subsume_assets(to_weigh.clone());

let mut message_to_weigh =
vec![ReceiveTeleportedAsset(to_weigh.clone()), ClearOrigin];
vec![ReceiveTeleportedAsset(to_weigh.clone().into()), ClearOrigin];
message_to_weigh.extend(xcm.0.clone().into_iter());
let (_, fee) = validate_send::<Config::XcmSender>(dest, Xcm(message_to_weigh))?;
// set aside fee to be charged by XcmSender
Expand Down

0 comments on commit 9368692

Please sign in to comment.