Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Fix validate in xcm-bridge-hub-router
Browse files Browse the repository at this point in the history
  • Loading branch information
yrong committed Apr 15, 2024
1 parent 68ab248 commit 7973ce3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions bridges/modules/xcm-bridge-hub-router/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ impl<T: Config<I>, I: 'static> SendXcm for Pallet<T, I> {
// versioned message to the sibling bridge hub. However, the local bridge hub may have a
// higher XCM version than the remote `dest`. Once again, it is better to discard such
// messages here than at the bridge hub (e.g., to avoid losing funds).
let destination_version = T::DestinationVersion::get_version_for(dest_ref)
.ok_or(SendError::DestinationUnsupported)?;
let destination_version =
T::DestinationVersion::get_version_for(dest_ref).ok_or(SendError::NotApplicable)?;
let _ = VersionedXcm::from(xcm_ref.clone())
.into_version(destination_version)
.map_err(|()| SendError::DestinationUnsupported)?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,6 @@ fn send_weth_asset_from_asset_hub_to_ethereum() {

AssetHubRococo::force_default_xcm_version(Some(XCM_VERSION));
BridgeHubRococo::force_default_xcm_version(Some(XCM_VERSION));
AssetHubRococo::force_xcm_version(
Location::new(2, [GlobalConsensus(Ethereum { chain_id: CHAIN_ID })]),
XCM_VERSION,
);

BridgeHubRococo::fund_accounts(vec![(assethub_sovereign.clone(), INITIAL_FUND)]);
AssetHubRococo::fund_accounts(vec![(AssetHubRococoReceiver::get(), INITIAL_FUND)]);
Expand Down

0 comments on commit 7973ce3

Please sign in to comment.