Skip to content

Commit

Permalink
added XcmTrustedQueryResult type and removed extra argument lines
Browse files Browse the repository at this point in the history
  • Loading branch information
x3c41a committed Oct 17, 2024
1 parent bcbd187 commit 225a055
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,8 @@ pub type Executive = frame_executive::Executive<
Migrations,
>;

type XcmTrustedQueryResult = Result<bool, xcm_runtime_apis::trusted_query::Error>;

#[cfg(feature = "runtime-benchmarks")]
mod benches {
frame_benchmarking::define_benchmarks!(
Expand Down Expand Up @@ -1799,10 +1801,10 @@ impl_runtime_apis! {
}

impl xcm_runtime_apis::trusted_query::TrustedQueryApi<Block> for Runtime {
fn is_trusted_reserve(asset: VersionedAsset, location: VersionedLocation) -> Result<bool, xcm_runtime_apis::trusted_query::Error> {
fn is_trusted_reserve(asset: VersionedAsset, location: VersionedLocation) -> XcmTrustedQueryResult {
PolkadotXcm::is_trusted_reserve(asset, location)
}
fn is_trusted_teleporter(asset: VersionedAsset, location: VersionedLocation) -> Result<bool, xcm_runtime_apis::trusted_query::Error> {
fn is_trusted_teleporter(asset: VersionedAsset, location: VersionedLocation) -> XcmTrustedQueryResult {
PolkadotXcm::is_trusted_teleporter(asset, location)
}
}
Expand Down
2 changes: 0 additions & 2 deletions polkadot/xcm/xcm-runtime-apis/src/trusted_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@ sp_api::decl_runtime_apis! {
/// Returns if the location is a trusted reserve for the asset.
///
/// # Arguments
///
/// * `asset`: `VersionedAsset`.
/// * `location`: `VersionedLocation`.
fn is_trusted_reserve(asset: VersionedAsset, location: VersionedLocation) -> Result<bool, Error>;
/// Returns if the asset can be teleported to the location.
///
/// # Arguments
///
/// * `asset`: `VersionedAsset`.
/// * `location`: `VersionedLocation`.
fn is_trusted_teleporter(asset: VersionedAsset, location: VersionedLocation) -> Result<bool, Error>;
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit 225a055

Please sign in to comment.