diff --git a/.changeset/tricky-points-smell.md b/.changeset/tricky-points-smell.md new file mode 100644 index 00000000..de39416e --- /dev/null +++ b/.changeset/tricky-points-smell.md @@ -0,0 +1,5 @@ +--- +"@balancer/sdk": patch +--- + +fix: nested single token remove v2 validation diff --git a/src/entities/utils/isPoolToken.ts b/src/entities/utils/isPoolToken.ts index ff1ebc25..fa2ede54 100644 --- a/src/entities/utils/isPoolToken.ts +++ b/src/entities/utils/isPoolToken.ts @@ -26,7 +26,7 @@ export function isPoolToken( const isToken = isSameAddress(t.address, token); const isUnderlying = isPoolTokenWithUnderlying(t) && - t.underlyingToken && + t.underlyingToken?.address && isSameAddress(t.underlyingToken.address, token); if (isToken || isUnderlying) { diff --git a/test/nestedPoolStateValidation.test.ts b/src/entities/utils/validateNestedPoolState.test.ts similarity index 97% rename from test/nestedPoolStateValidation.test.ts rename to src/entities/utils/validateNestedPoolState.test.ts index ca06850b..cf3e2d62 100644 --- a/test/nestedPoolStateValidation.test.ts +++ b/src/entities/utils/validateNestedPoolState.test.ts @@ -1,10 +1,6 @@ // pnpm test -- nestedPoolStateValidation.test.ts import { describe, expect, test } from 'vitest'; -import { - NestedPoolState, - NestedPoolV2, - validateNestedPoolState, -} from '../src/entities'; +import { NestedPoolState, NestedPoolV2, validateNestedPoolState } from '..'; import { PoolType } from '@/types'; describe('nested pool state validations', () => { @@ -45,7 +41,7 @@ describe('nested pool state validations', () => { TOP 3POOL_BPT/auraBal_BPT/WETH - 3POOL_BPT auraBal_BPT + 3POOL_BPT auraBal_BPT DAI/USDC/USDT auraBal/8020_BPT 8020_BPT