Skip to content

Commit

Permalink
create pool add check market lot size is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
edsolater committed Dec 21, 2023
1 parent ec9eeed commit 00df453
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/application/createPool/updateCreatePoolInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ export async function updateCreatePoolInfo(txParam: { marketId: PublicKeyish }):
isPubEqual(marketBufferInfo.owner, programIds.OPENBOOK_MARKET),
`market program id is not OpenBook program id`
)
const { baseMint, quoteMint } = MARKET_STATE_LAYOUT_V3.decode(marketBufferInfo.data)
const { baseMint, quoteMint, baseLotSize, quoteLotSize } = MARKET_STATE_LAYOUT_V3.decode(marketBufferInfo.data)
// assert(
// Object.values(routeMiddleMints).includes(String(quoteMint)),
// `only support USDT, USDC, USDH, RAY, WSOL(SOL), mSOL, stSOL, SRM, PAI, ETH, USH. current: ${toPubString(
// quoteMint
// ).slice(0, 4)}...${toPubString(quoteMint).slice(-4)} is not avaliable`
// )
assert(!baseLotSize.isZero(), 'Base lot size is zero')
assert(!quoteLotSize.isZero(), 'Quote lot size is zero')

const isBaseVerifyed = await verifyToken(baseMint, { canWhiteList: true, noLog: true })
assert(isBaseVerifyed, 'base token freeze authority enabled')
Expand Down

1 comment on commit 00df453

@vercel
Copy link

@vercel vercel bot commented on 00df453 Dec 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.