Skip to content

Commit

Permalink
RangeOrderChange
Browse files Browse the repository at this point in the history
  • Loading branch information
AlastairHolmes committed Oct 30, 2023
1 parent d31a954 commit 2948612
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions api/lib/src/lp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use chainflip_engine::state_chain_observer::client::{
extrinsic_api::signed::{SignedExtrinsicApi, UntilInBlock},
StateChainClient,
};
use pallet_cf_pools::{AssetAmounts, IncreaseOrDecrease, OrderId, RangeOrderDelta, RangeOrderSize};
use pallet_cf_pools::{AssetAmounts, IncreaseOrDecrease, OrderId, RangeOrderChange, RangeOrderSize};
use serde::{Deserialize, Serialize};
use sp_core::H256;
use state_chain_runtime::RuntimeCall;
Expand All @@ -25,7 +25,7 @@ pub struct RangeOrderReturn {
tick_range: Range<Tick>,
liquidity_total: Liquidity,
collected_fees: AssetAmounts,
order_delta: Option<IncreaseOrDecrease<RangeOrderDelta>>,
order_delta: Option<IncreaseOrDecrease<RangeOrderChange>>,
}

fn collect_range_order_returns(
Expand Down
6 changes: 3 additions & 3 deletions state-chain/pallets/cf-pools/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ pub mod pallet {
Deserialize,
Serialize,
)]
pub struct RangeOrderDelta {
pub struct RangeOrderChange {
pub liquidity: Liquidity,
pub amounts: AssetsMap<AssetAmount>,
}
Expand Down Expand Up @@ -542,7 +542,7 @@ pub mod pallet {
pair_asset: Asset,
id: OrderId,
tick_range: core::ops::Range<Tick>,
order_delta: Option<IncreaseOrDecrease<RangeOrderDelta>>,
order_delta: Option<IncreaseOrDecrease<RangeOrderChange>>,
liquidity_total: Liquidity,
collected_fees: AssetAmounts,
},
Expand Down Expand Up @@ -1408,7 +1408,7 @@ impl<T: Config> Pallet<T> {
None
} else {
Some(
liquidity_change.map(|liquidity| RangeOrderDelta {
liquidity_change.map(|liquidity| RangeOrderChange {
liquidity,
amounts: assets_delta,
}),
Expand Down

0 comments on commit 2948612

Please sign in to comment.