Skip to content

Commit

Permalink
replace incremental id type from primites as primites tpyes only used…
Browse files Browse the repository at this point in the history
… in runtime
  • Loading branch information
dmoka committed Dec 19, 2024
1 parent 2ff4aee commit c7be65b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions pallets/amm-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@

use crate::types::*;
use frame_support::sp_runtime::app_crypto::sp_core;
use frame_support::sp_runtime::{ArithmeticError, BoundedVec, DispatchError, DispatchResult};
use frame_support::sp_runtime::{BoundedVec, DispatchError, DispatchResult};
use frame_system::pallet_prelude::BlockNumberFor;
pub use primitives::IncrementalId as IncrementalIdType;
use sp_core::{ConstU32};
use sp_std::vec::Vec;

#[cfg(test)]
mod tests;

Expand Down
2 changes: 1 addition & 1 deletion pallets/amm-support/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use serde::{Deserialize, Serialize};

pub type AssetId = u32;
pub type Balance = u128;

pub type IncrementalIdType = u32;
pub type OtcOrderId = u32;

#[derive(Encode, Decode, Clone, Copy, Debug, Eq, PartialEq, TypeInfo, MaxEncodedLen)]
Expand Down
2 changes: 1 addition & 1 deletion pallets/route-executor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub use hydradx_traits::router::{

use orml_traits::arithmetic::{CheckedAdd, CheckedSub};
pub use pallet_amm_support::types::{ExecutionType, Fee};
use pallet_amm_support::IncrementalIdType;
use pallet_amm_support::types::IncrementalIdType;
use sp_core::U512;
use sp_runtime::traits::{AccountIdConversion, CheckedDiv};
use sp_runtime::{ArithmeticError, DispatchError, FixedPointNumber, FixedU128, Saturating, TransactionOutcome};
Expand Down
3 changes: 0 additions & 3 deletions primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,3 @@ pub type Header = generic::Header<BlockNumber, BlakeTwo256>;

/// Block type.
pub type Block = generic::Block<Header, UncheckedExtrinsic>;

/// Incremental ID type
pub type IncrementalId = u32;
3 changes: 1 addition & 2 deletions runtime/adapters/src/xcm_exchange.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use frame_system::ensure_signed;
use orml_traits::MultiCurrency;
use polkadot_xcm::v4::prelude::*;
use sp_core::Get;
Expand All @@ -7,7 +6,7 @@ use sp_std::marker::PhantomData;
use sp_std::vec;
use xcm_executor::traits::AssetExchange;
use xcm_executor::AssetsInHolding;
use pallet_amm_support::types::{ExecutionType, Fee};
use pallet_amm_support::types::{ExecutionType};

/// Implements `AssetExchange` to support the `ExchangeAsset` XCM instruction.
///
Expand Down

0 comments on commit c7be65b

Please sign in to comment.