diff --git a/bridges/modules/xcm-bridge-hub/src/mock.rs b/bridges/modules/xcm-bridge-hub/src/mock.rs index e2460cd26631c..d290a6e86b0a8 100644 --- a/bridges/modules/xcm-bridge-hub/src/mock.rs +++ b/bridges/modules/xcm-bridge-hub/src/mock.rs @@ -17,7 +17,6 @@ #![cfg(test)] use crate as pallet_xcm_bridge_hub; -use std::marker::PhantomData; use bp_messages::{ target_chain::{DispatchMessage, MessageDispatch}, @@ -33,7 +32,7 @@ use frame_support::{ }; use frame_support::traits::EitherOf; use frame_support::traits::fungible::Mutate; -use frame_system::{EnsureRoot, EnsureRootWithSuccess}; +use frame_system::EnsureRootWithSuccess; use polkadot_parachain_primitives::primitives::Sibling; use sp_core::H256; use sp_runtime::{ @@ -44,7 +43,7 @@ use sp_runtime::{ use sp_std::cell::RefCell; use xcm::prelude::*; use xcm_builder::{AllowUnpaidExecutionFrom, DispatchBlob, DispatchBlobError, FixedWeightBounds, InspectMessageQueues, NetworkExportTable, NetworkExportTableItem, ParentIsPreset, SiblingParachainConvertsVia, SovereignPaidRemoteExporter, UnpaidLocalExporter}; -use xcm_executor::traits::{ConvertLocation, ConvertOrigin}; +use xcm_executor::traits::ConvertLocation; use xcm_executor::XcmExecutor; pub type AccountId = AccountId32; diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index f63e1f8fcf65b..f7f662d75de1d 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -178,6 +178,10 @@ pub type Migrations = ( RocksDbWeight, >, pallet_bridge_relayers::migration::v1::MigrationToV1, + pallet_xcm_bridge_hub::migration::v1::MigrationToV1< + Runtime, + bridge_to_westend_config::XcmOverBridgeHubWestendInstance, + >, // permanent pallet_xcm::migration::MigrateToLatestXcmVersion, ); diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs index 1d7cd5de40eb4..1e9061835fbbb 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs @@ -159,6 +159,10 @@ pub type Migrations = ( RocksDbWeight, >, pallet_bridge_relayers::migration::v1::MigrationToV1, + pallet_xcm_bridge_hub::migration::v1::MigrationToV1< + Runtime, + bridge_to_rococo_config::XcmOverBridgeHubRococoInstance, + >, // permanent pallet_xcm::migration::MigrateToLatestXcmVersion, snowbridge_pallet_system::migration::v0::InitializeOnUpgrade< diff --git a/cumulus/parachains/runtimes/bridge-hubs/test-utils/src/test_cases/mod.rs b/cumulus/parachains/runtimes/bridge-hubs/test-utils/src/test_cases/mod.rs index 24372f57ae7d8..322c5cc7e590c 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/test-utils/src/test_cases/mod.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/test-utils/src/test_cases/mod.rs @@ -687,11 +687,16 @@ pub fn open_and_close_bridge_works>::AllowWithoutBridgeDeposit::contains( locations.bridge_origin_relative_location() ) { - Zero::zero() + None } else { - >::BridgeDeposit::get() + >>::BridgeDeposit::get(); + + Some(bp_xcm_bridge_hub::Deposit::new(bridge_owner_account, deposit)) }; // check bridge/lane DOES not exist @@ -741,9 +746,6 @@ pub fn open_and_close_bridge_works