Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Potential fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
bkontur committed Aug 7, 2023
1 parent c1f882d commit 28459c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions xcm/pallet-xcm/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
]),
)]
Expand Down
3 changes: 1 addition & 2 deletions xcm/xcm-executor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,7 @@ impl<Config: config::Config> XcmExecutor<Config> {
) -> Result<XcmHash, XcmError> {
let (ticket, fee) = validate_send::<Config::XcmSender>(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)
}
Expand Down

0 comments on commit 28459c0

Please sign in to comment.