From e0c8745ff7e5f550441ba666c7e9a00b08843a7b Mon Sep 17 00:00:00 2001 From: Frank Bell <60948618+evilrobot-01@users.noreply.github.com> Date: Fri, 25 Oct 2024 20:16:04 +0100 Subject: [PATCH] fix: minor fixes (#359) --- pop-api/integration-tests/src/incentives.rs | 4 ++-- pop-api/integration-tests/src/lib.rs | 5 ++--- pop-api/src/v0/messaging/mod.rs | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/pop-api/integration-tests/src/incentives.rs b/pop-api/integration-tests/src/incentives.rs index fb9a72cb..bedf96d0 100644 --- a/pop-api/integration-tests/src/incentives.rs +++ b/pop-api/integration-tests/src/incentives.rs @@ -1,7 +1,7 @@ -use frame_support::traits::{fungible::Inspect, Currency, Hooks}; +use frame_support::traits::{fungible::Inspect, Currency}; use pop_api::primitives::{Era, Error}; use pop_runtime_devnet::{Balances, Incentives, MINUTES}; -use sp_runtime::{app_crypto::sp_core::H160, Saturating}; +use sp_runtime::app_crypto::sp_core::H160; use super::*; diff --git a/pop-api/integration-tests/src/lib.rs b/pop-api/integration-tests/src/lib.rs index e199d3e1..1ffdd849 100644 --- a/pop-api/integration-tests/src/lib.rs +++ b/pop-api/integration-tests/src/lib.rs @@ -53,9 +53,8 @@ fn new_test_ext() -> sp_io::TestExternalities { ext.execute_with(|| System::set_block_number(1)); // register account mappings ext.execute_with(|| { - Revive::map_account(RuntimeOrigin::signed(ALICE)); - Revive::map_account(RuntimeOrigin::signed(BOB)); - Revive::map_account(RuntimeOrigin::signed(FERDIE)); + Revive::map_account(RuntimeOrigin::signed(ALICE)).unwrap(); + Revive::map_account(RuntimeOrigin::signed(BOB)).unwrap(); }); ext } diff --git a/pop-api/src/v0/messaging/mod.rs b/pop-api/src/v0/messaging/mod.rs index 9f42f266..4b281e13 100644 --- a/pop-api/src/v0/messaging/mod.rs +++ b/pop-api/src/v0/messaging/mod.rs @@ -1,6 +1,7 @@ use ink::prelude::vec::Vec; use crate::{ + constants::MESSAGING, primitives::{AccountId, Balance, BlockNumber}, ChainExtensionMethodApi, Result, StatusCode, }; @@ -10,7 +11,6 @@ pub mod ismp; /// APIs for messaging using Polkadot's Cross-Consensus Messaging (XCM). pub mod xcm; -pub(crate) const API: u8 = 151; // Dispatchables pub(super) const _REQUEST: u8 = 0; pub(super) const ISMP_GET: u8 = 1; @@ -25,11 +25,11 @@ pub(super) const QUERY_ID: u8 = 2; pub type RequestId = u64; fn build_dispatch(dispatchable: u8) -> ChainExtensionMethodApi { - crate::v0::build_dispatch(API, dispatchable) + crate::v0::build_dispatch(MESSAGING, dispatchable) } fn build_read_state(state_query: u8) -> ChainExtensionMethodApi { - crate::v0::build_read_state(API, state_query) + crate::v0::build_read_state(MESSAGING, state_query) } #[inline]