Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for XCM payment api report #1399

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion runtime/astar/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion runtime/shibuya/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion runtime/shiden/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 0 additions & 3 deletions tests/integration/src/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/src/xcm_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down
Loading