Skip to content

Commit

Permalink
Fix for main
Browse files Browse the repository at this point in the history
  • Loading branch information
vimukthi-git committed Mar 18, 2022
1 parent 0c3f85d commit 1b57624
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frame/pablo/src/common_test_functions.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
mock::{Pablo, *},
PoolConfiguration::{ConstantProduct, StableSwap},
PoolConfiguration::{ConstantProduct, LiquidityBootstrapping, StableSwap},
PoolInitConfiguration,
};
use frame_support::{
Expand All @@ -11,7 +11,7 @@ use frame_support::{
/// `expected_lp_check` takes base_amount, quote_amount and lp_tokens in order and returns
/// true if lp_tokens are expected for given base_amount, quote_amount.
pub fn common_add_remove_lp(
init_config: PoolInitConfiguration<AssetId>,
init_config: PoolInitConfiguration<AccountId, AssetId, BlockNumber>,
init_base_amount: Balance,
init_quote_amount: Balance,
base_amount: Balance,
Expand All @@ -22,6 +22,7 @@ pub fn common_add_remove_lp(
let pair = match init_config {
PoolInitConfiguration::StableSwap { pair, .. } => pair,
PoolInitConfiguration::ConstantProduct { pair, .. } => pair,
PoolInitConfiguration::LiquidityBootstrapping(pool) => pool.pair,
};
// Mint the tokens
assert_ok!(Tokens::mint_into(pair.base, &ALICE, init_base_amount));
Expand All @@ -41,6 +42,7 @@ pub fn common_add_remove_lp(
let lp_token = match pool {
StableSwap(pool) => pool.lp_token,
ConstantProduct(pool) => pool.lp_token,
LiquidityBootstrapping(_) => panic!("Not implemented"),
};
// Mint the tokens
assert_ok!(Tokens::mint_into(pair.base, &BOB, base_amount));
Expand Down

0 comments on commit 1b57624

Please sign in to comment.