Skip to content

Commit

Permalink
FIX: use store to get liquidity pool
Browse files Browse the repository at this point in the history
  • Loading branch information
liangping committed Sep 20, 2023
1 parent 2a45dfa commit 2aca657
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spec/app/ics-101-interchain-liquidity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@ function multiAssetWithdraw(msg: MsgMultiAssetWithdrawRequest): MsgMultiAssetWit
abortTransactionUnless(store.bankKeeper.hasSupply(poolTokenDenom));

// Get the liquidity pool
const { pool, found } = k.getInterchainLiquidityPool(ctx, poolTokenDenom);
const { pool, found } = store.getInterchainLiquidityPool(msg.poolId);
abortTransactionUnless(found);

const amm = new InterchainMarketMaker(pool);
Expand Down Expand Up @@ -1268,7 +1268,8 @@ function onTakePoolReceived(msg: MsgTakePoolRequest): string {
const totalAmount = pool.sumOfPoolAssets();
const mintAmount = (totalAmount * asset.weight) / 100;

store.mintTokens(pool.sourceCreator, new sdk.Coin(pool.supply.denom, mintAmount));
// TODO remove it or add a options for depositor to choose where LP is minted.
// store.mintTokens(pool.sourceCreator, new sdk.Coin(pool.supply.denom, mintAmount));
store.setInterchainLiquidityPool(pool);
return pool.id;
}
Expand Down

0 comments on commit 2aca657

Please sign in to comment.