Skip to content

Commit

Permalink
fix: minor fixes (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilrobot-01 authored Oct 25, 2024
1 parent a8c024c commit e0c8745
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions pop-api/integration-tests/src/incentives.rs
Original file line number Diff line number Diff line change
@@ -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::*;

Expand Down
5 changes: 2 additions & 3 deletions pop-api/integration-tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
6 changes: 3 additions & 3 deletions pop-api/src/v0/messaging/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use ink::prelude::vec::Vec;

use crate::{
constants::MESSAGING,
primitives::{AccountId, Balance, BlockNumber},
ChainExtensionMethodApi, Result, StatusCode,
};
Expand All @@ -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;
Expand All @@ -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]
Expand Down

0 comments on commit e0c8745

Please sign in to comment.