Skip to content

Commit

Permalink
patch: fix type error by extending AddLiquidity class
Browse files Browse the repository at this point in the history
  • Loading branch information
MattPereira committed Jan 25, 2025
1 parent 2ae3ba2 commit e8e5abc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/entities/addLiquidity/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { Hex } from 'viem';

export class AddLiquidity implements AddLiquidityBase {
constructor(public config?: AddLiquidityConfig) {}
private readonly inputValidator: InputValidator = new InputValidator();
protected readonly inputValidator: InputValidator = new InputValidator();

query(
input: AddLiquidityInput,
Expand Down
7 changes: 2 additions & 5 deletions src/entities/addLiquidityBoosted/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,15 @@ import {
balancerRouterAbi,
} from '@/abi';

import { InputValidator } from '../inputValidator/inputValidator';

import { Hex } from '@/types';
import {
AddLiquidityBoostedBuildCallInput,
AddLiquidityBoostedInput,
AddLiquidityBoostedQueryOutput,
} from './types';
import { AddLiquidity } from '../addLiquidity';

export class AddLiquidityBoostedV3 {
private readonly inputValidator: InputValidator = new InputValidator();

export class AddLiquidityBoostedV3 extends AddLiquidity {
async query(
input: AddLiquidityBoostedInput,
poolState: PoolStateWithUnderlyings,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ describe('remove liquidity test', () => {
});
snapshot = await client.snapshot();

// Approve the Vault to spend Tokens on the users behalf via Permit2
for (const token of boostedPool_USDC_USDT.tokens) {
await approveSpenderOnPermit2(
client,
Expand All @@ -126,7 +125,7 @@ describe('remove liquidity test', () => {

await doAddLiquidity({
client,
addLiquidity: new AddLiquidityBoostedV3(), // TODO: debug linter type complaint
addLiquidity: new AddLiquidityBoostedV3(),
addLiquidityInput,
slippage: Slippage.fromPercentage('1'),
poolState: boostedPool_USDC_USDT,
Expand Down

0 comments on commit e8e5abc

Please sign in to comment.