diff --git a/xcm/pallet-xcm/src/tests.rs b/xcm/pallet-xcm/src/tests.rs index d560c9099e73..f1d9798d6f13 100644 --- a/xcm/pallet-xcm/src/tests.rs +++ b/xcm/pallet-xcm/src/tests.rs @@ -583,9 +583,9 @@ fn reserve_transfer_assets_with_paid_router_works() { vec![( Parachain(PARA_ID).into(), Xcm(vec![ - ReserveAssetDeposited((Parent, SEND_AMOUNT - xcm_router_fee_amount).into()), + ReserveAssetDeposited((Parent, SEND_AMOUNT).into()), ClearOrigin, - buy_limited_execution((Parent, SEND_AMOUNT - xcm_router_fee_amount), Weight::from_parts(4000, 4000)), + buy_limited_execution((Parent, SEND_AMOUNT), Weight::from_parts(4000, 4000)), DepositAsset { assets: AllCounted(1).into(), beneficiary: dest }, ]), )] diff --git a/xcm/xcm-executor/src/lib.rs b/xcm/xcm-executor/src/lib.rs index ae99c6adac2d..c45dc8981ad5 100644 --- a/xcm/xcm-executor/src/lib.rs +++ b/xcm/xcm-executor/src/lib.rs @@ -405,8 +405,7 @@ impl XcmExecutor { ) -> Result { let (ticket, fee) = validate_send::(dest, msg)?; if !Config::FeeManager::is_waived(self.origin_ref(), reason) { - let paid = self.holding.try_take(fee.into()).map_err(|_| XcmError::NotHoldingFees)?; - Config::FeeManager::handle_fee(paid.into(), Some(&self.context)); + self.take_fee(fee, reason)?; } Config::XcmSender::deliver(ticket).map_err(Into::into) }