Skip to content

Commit

Permalink
renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
dmoka committed Oct 31, 2024
1 parent 7acf662 commit 305e948
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pallets/xyk-liquidity-mining/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ type PeriodOf<T> = BlockNumberFor<T>;
pub mod pallet {
use super::*;
use frame_system::pallet_prelude::BlockNumberFor;
use hydradx_traits::XykAddLiquidity;
use hydradx_traits::AmmAddLiquidity;
use hydradx_traits::pools::DustRemovalAccountWhitelist;

const STORAGE_VERSION: StorageVersion = StorageVersion::new(0);
Expand Down Expand Up @@ -116,7 +116,7 @@ pub mod pallet {
type AMM: AMM<Self::AccountId, AssetId, AssetPair, Balance>
+ AMMPosition<AssetId, Balance, Error = DispatchError>;

type XykAddLiquidity: XykAddLiquidity<OriginFor<Self>, AssetId, Balance>;
type XykAddLiquidity: AmmAddLiquidity<OriginFor<Self>, AssetId, Balance>;

/// The origin account that can create new liquidity mining program.
type CreateOrigin: EnsureOrigin<Self::RuntimeOrigin>;
Expand Down
4 changes: 2 additions & 2 deletions pallets/xyk-liquidity-mining/src/tests/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ impl liq_mining::Config for Test {
pub const LOCKED_XYK_ADD_LIQUIDITY_XYK_SHARE_AMOUNT: Balance = 20 * ONE;
pub struct XykAddLiquidityMock;

impl XykAddLiquidity<OriginFor<Test>, AssetId, Balance> for XykAddLiquidityMock {
impl AmmAddLiquidity<OriginFor<Test>, AssetId, Balance> for XykAddLiquidityMock {
fn add_liquidity(
_origin: OriginFor<Test>,
asset_a: AssetId,
Expand Down Expand Up @@ -426,7 +426,7 @@ where
}

use frame_support::traits::tokens::nonfungibles::{Create, Inspect, Mutate, Transfer};
use hydradx_traits::XykAddLiquidity;
use hydradx_traits::AmmAddLiquidity;

pub struct DummyNFT;

Expand Down
4 changes: 2 additions & 2 deletions pallets/xyk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ use sp_std::{vec, vec::Vec};

use crate::types::{Amount, AssetId, AssetPair, Balance};
use hydra_dx_math::ratio::Ratio;
use hydradx_traits::XykAddLiquidity;
use hydradx_traits::AmmAddLiquidity;
use orml_traits::{MultiCurrency, MultiCurrencyExtended};

#[cfg(test)]
Expand Down Expand Up @@ -1123,7 +1123,7 @@ impl<T: Config> AMMPosition<AssetId, Balance> for Pallet<T> {
}
}

impl<T: Config> XykAddLiquidity<OriginFor<T>, AssetId, Balance> for Pallet<T> {
impl<T: Config> AmmAddLiquidity<OriginFor<T>, AssetId, Balance> for Pallet<T> {
fn add_liquidity(
origin: OriginFor<T>,
asset_a: AssetId,
Expand Down
2 changes: 1 addition & 1 deletion traits/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ pub trait AMMPosition<AssetId, Balance> {
}

/// Implementers of this trait are able to add liquidity to their AMM pool.
pub trait XykAddLiquidity<Origin, AssetId, Balance> {
pub trait AmmAddLiquidity<Origin, AssetId, Balance> {
fn add_liquidity(
origin: Origin,
asset_a: AssetId,
Expand Down

0 comments on commit 305e948

Please sign in to comment.