Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions polkadot/runtime/rococo/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ where
// Do `check_out` accounting since the XCM Executor's `InitiateTeleport` doesn't support
// unpaid teleports.

// withdraw the asset from `who`
let who_origin =
Junction::AccountId32 { network: None, id: who.clone().into() }.into_location();
let _withdrawn = xcm_config::LocalAssetTransactor::withdraw_asset(&roc, &who_origin, None)
.map_err(|_| pallet_xcm::Error::<Runtime>::CannotWithdraw)?;

// check out
xcm_config::LocalAssetTransactor::can_check_out(
&destination,
Expand Down
6 changes: 6 additions & 0 deletions polkadot/runtime/westend/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ where
// Do `check_out` accounting since the XCM Executor's `InitiateTeleport` doesn't support
// unpaid teleports.

// withdraw the asset from `who`
let who_origin =
Junction::AccountId32 { network: None, id: who.clone().into() }.into_location();
let _withdrawn = xcm_config::LocalAssetTransactor::withdraw_asset(&wnd, &who_origin, None)
.map_err(|_| pallet_xcm::Error::<Runtime>::CannotWithdraw)?;

// check out
xcm_config::LocalAssetTransactor::can_check_out(
&destination,
Expand Down
2 changes: 2 additions & 0 deletions polkadot/xcm/pallet-xcm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,8 @@ pub mod pallet {
CannotReanchor,
/// Too many assets have been attempted for transfer.
TooManyAssets,
/// The amount of the asset requested could not be withdrawn from the origin.
CannotWithdraw,
/// Origin is invalid for sending.
InvalidOrigin,
/// The version of the `Versioned` value used is not able to be interpreted.
Expand Down