Skip to content

Commit

Permalink
Replace V4V3LocationConverter with WithLatestLocationConverter
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadkaouk committed Jun 6, 2024
1 parent 1c738d3 commit 3d6525b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions runtime/moonbase/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ impl Into<Option<xcm::v3::Location>> for AssetType {
impl Into<Option<Location>> for AssetType {
fn into(self) -> Option<Location> {
match self {
Self::Xcm(location) => xcm_builder::V4V3LocationConverter::convert_back(&location),
Self::Xcm(location) => xcm_builder::WithLatestLocationConverter::convert_back(&location),
}
}
}
Expand Down Expand Up @@ -704,7 +704,7 @@ impl pallet_erc20_xcm_bridge::Config for Runtime {
#[cfg(feature = "runtime-benchmarks")]
mod testing {
use super::*;
use xcm_builder::V4V3LocationConverter;
use xcm_builder::WithLatestLocationConverter;

/// This From exists for benchmarking purposes. It has the potential side-effect of calling
/// AssetManager::set_asset_type_asset_id() and should NOT be used in any production code.
Expand All @@ -719,7 +719,7 @@ mod testing {
asset_id
} else {
let asset_type = AssetType::Xcm(
V4V3LocationConverter::convert(&location).expect("convert to v3"),
WithLatestLocationConverter::convert(&location).expect("convert to v3"),
);
let asset_id: AssetId = asset_type.clone().into();
AssetManager::set_asset_type_asset_id(asset_type, asset_id);
Expand Down
6 changes: 3 additions & 3 deletions runtime/moonbeam/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ impl Into<Option<xcm::v3::Location>> for AssetType {
impl Into<Option<Location>> for AssetType {
fn into(self) -> Option<Location> {
match self {
Self::Xcm(location) => xcm_builder::V4V3LocationConverter::convert_back(&location),
Self::Xcm(location) => xcm_builder::WithLatestLocationConverter::convert_back(&location),
}
}
}
Expand Down Expand Up @@ -681,7 +681,7 @@ impl pallet_erc20_xcm_bridge::Config for Runtime {
#[cfg(feature = "runtime-benchmarks")]
mod testing {
use super::*;
use xcm_builder::V4V3LocationConverter;
use xcm_builder::WithLatestLocationConverter;

/// This From exists for benchmarking purposes. It has the potential side-effect of calling
/// AssetManager::set_asset_type_asset_id() and should NOT be used in any production code.
Expand All @@ -696,7 +696,7 @@ mod testing {
asset_id
} else {
let asset_type = AssetType::Xcm(
V4V3LocationConverter::convert(&location).expect("convert to v3"),
WithLatestLocationConverter::convert(&location).expect("convert to v3"),
);
let asset_id: AssetId = asset_type.clone().into();
AssetManager::set_asset_type_asset_id(asset_type, asset_id);
Expand Down
6 changes: 3 additions & 3 deletions runtime/moonriver/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ impl Into<Option<xcm::v3::Location>> for AssetType {
impl Into<Option<Location>> for AssetType {
fn into(self) -> Option<Location> {
match self {
Self::Xcm(location) => xcm_builder::V4V3LocationConverter::convert_back(&location),
Self::Xcm(location) => xcm_builder::WithLatestLocationConverter::convert_back(&location),
}
}
}
Expand Down Expand Up @@ -694,7 +694,7 @@ impl pallet_erc20_xcm_bridge::Config for Runtime {
#[cfg(feature = "runtime-benchmarks")]
mod testing {
use super::*;
use xcm_builder::V4V3LocationConverter;
use xcm_builder::WithLatestLocationConverter;

/// This From exists for benchmarking purposes. It has the potential side-effect of calling
/// AssetManager::set_asset_type_asset_id() and should NOT be used in any production code.
Expand All @@ -709,7 +709,7 @@ mod testing {
asset_id
} else {
let asset_type = AssetType::Xcm(
V4V3LocationConverter::convert(&location).expect("convert to v3"),
WithLatestLocationConverter::convert(&location).expect("convert to v3"),
);
let asset_id: AssetId = asset_type.clone().into();
AssetManager::set_asset_type_asset_id(asset_type, asset_id);
Expand Down

0 comments on commit 3d6525b

Please sign in to comment.