Skip to content

Commit

Permalink
Fix for XCM payment api report
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinonard committed Dec 20, 2024
1 parent 4d1a346 commit 7ad78a0
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 7 deletions.
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

0 comments on commit 7ad78a0

Please sign in to comment.