Skip to content

Commit

Permalink
fix(v4-sdk): export PositionManager (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongeric authored Sep 23, 2024
1 parent d8d910c commit ce9ca55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sdks/v4-sdk/src/PositionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,8 @@ export abstract class V4PositionManager {
const calldataList: string[] = []
const planner = new V4PositionPlanner()

const isMintAction = isMint(options)

// Encode initialize pool.
if (isMintAction && shouldCreatePool(options)) {
if (isMint(options) && shouldCreatePool(options)) {
// No planner used here because initializePool is not supported as an Action
calldataList.push(
V4PositionManager.encodeInitializePool(position.pool.poolKey, options.sqrtPriceX96!, options.hookData)
Expand All @@ -206,7 +204,7 @@ export abstract class V4PositionManager {
const amount1Max = toHex(maximumAmounts.amount1)

// mint
if (isMintAction) {
if (isMint(options)) {
const recipient: string = validateAndParseAddress(options.recipient)
planner.addMint(
position.pool,
Expand Down
1 change: 1 addition & 0 deletions sdks/v4-sdk/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './entities'
export * from './utils'
export * from './PositionManager'

0 comments on commit ce9ca55

Please sign in to comment.