Skip to content

Commit

Permalink
chore: rename gqlTokens to poolActionableTokens
Browse files Browse the repository at this point in the history
  • Loading branch information
agualis committed Oct 28, 2024
1 parent 97df790 commit cf8af1e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/lib/modules/swap/handlers/PoolSwap.handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ export class PoolSwapHandler extends BaseDefaultSwapHandler {

constructor(
public pool: Pool,
public gqlTokens: GqlToken[],
public poolActionableTokens: GqlToken[],
) {
super()
}

async simulate({ ...variables }: SimulateSwapInputs): Promise<SdkSimulateSwapResponse> {
const { swapType, swapAmount } = variables

const tokenIn = this.gqlTokens.find(token => {
const tokenIn = this.poolActionableTokens.find(token => {
return isSameAddress(token.address, variables.tokenIn)
}) as TokenApi

if (!tokenIn) {
throw new Error('TokenIn not found in pool swap handler')
}

const tokenOut = this.gqlTokens.find(token =>
const tokenOut = this.poolActionableTokens.find(token =>
isSameAddress(token.address, variables.tokenOut),
) as TokenApi

Expand Down

0 comments on commit cf8af1e

Please sign in to comment.