From 765d44ba1e9210279088ff765aff5ee6979601d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dino=20Pa=C4=8Dandi?= <3002868+Dinonard@users.noreply.github.com> Date: Tue, 24 Dec 2024 08:23:30 +0100 Subject: [PATCH] Fix for XCM payment api report (#1399) --- runtime/astar/src/lib.rs | 2 +- runtime/shibuya/src/lib.rs | 2 +- runtime/shiden/src/lib.rs | 2 +- tests/integration/src/setup.rs | 3 --- tests/integration/src/xcm_api.rs | 2 +- 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/runtime/astar/src/lib.rs b/runtime/astar/src/lib.rs index 7a292b4b01..61b6f7f780 100644 --- a/runtime/astar/src/lib.rs +++ b/runtime/astar/src/lib.rs @@ -2225,7 +2225,7 @@ impl_runtime_apis! { // for native token if asset_id.0 == xcm_config::AstarLocation::get() { - Ok(WeightToFee::weight_to_fee(&weight)) + Ok(XcmWeightToFee::weight_to_fee(&weight)) } // for foreign assets with “units per second” configurations else { diff --git a/runtime/shibuya/src/lib.rs b/runtime/shibuya/src/lib.rs index dddd9dbe95..bf839ea052 100644 --- a/runtime/shibuya/src/lib.rs +++ b/runtime/shibuya/src/lib.rs @@ -2329,7 +2329,7 @@ impl_runtime_apis! { // for native token if asset_id.0 == xcm_config::ShibuyaLocation::get() { - Ok(WeightToFee::weight_to_fee(&weight)) + Ok(XcmWeightToFee::weight_to_fee(&weight)) } // for foreign assets with “units per second” configurations else { diff --git a/runtime/shiden/src/lib.rs b/runtime/shiden/src/lib.rs index 1a14b19e6e..80a6cf3ffe 100644 --- a/runtime/shiden/src/lib.rs +++ b/runtime/shiden/src/lib.rs @@ -1904,7 +1904,7 @@ impl_runtime_apis! { // for native token if asset_id.0 == xcm_config::ShidenLocation::get() { - Ok(WeightToFee::weight_to_fee(&weight)) + Ok(XcmWeightToFee::weight_to_fee(&weight)) } // for foreign assets with “units per second” configurations else { diff --git a/tests/integration/src/setup.rs b/tests/integration/src/setup.rs index f4b7739afd..732b14a88f 100644 --- a/tests/integration/src/setup.rs +++ b/tests/integration/src/setup.rs @@ -45,7 +45,6 @@ pub use shibuya::*; #[cfg(feature = "shibuya")] mod shibuya { use super::*; - pub use shibuya_runtime::WeightToFee; pub use shibuya_runtime::*; /// 1 SBY. @@ -80,7 +79,6 @@ mod shibuya { pub use shiden::*; #[cfg(feature = "shiden")] mod shiden { - pub use shiden_runtime::WeightToFee; pub use shiden_runtime::*; /// 1 SDN. @@ -91,7 +89,6 @@ mod shiden { pub use astar::*; #[cfg(feature = "astar")] mod astar { - pub use astar_runtime::WeightToFee; pub use astar_runtime::*; /// 1 ASTR. diff --git a/tests/integration/src/xcm_api.rs b/tests/integration/src/xcm_api.rs index 26e285d360..5d17eda149 100644 --- a/tests/integration/src/xcm_api.rs +++ b/tests/integration/src/xcm_api.rs @@ -117,7 +117,7 @@ fn query_weight_to_asset_fee_is_ok() { // 1. Native asset payment { let weight = Weight::from_parts(1000, 1000); - let expected_fee = WeightToFee::weight_to_fee(&weight); + let expected_fee = XcmWeightToFee::weight_to_fee(&weight); let fee = Runtime::query_weight_to_asset_fee(weight, XcmAssetId(Location::here()).into()) .expect("Must return fee for native asset.");