Skip to content

Commit

Permalink
Merge pull request #484 from balancer/fix/singleRemoveV2Validation
Browse files Browse the repository at this point in the history
fix: nested single token remove v2 validation
  • Loading branch information
mkflow27 authored Nov 8, 2024
2 parents 67b2969 + 603fbd5 commit b4cc94b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/tricky-points-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@balancer/sdk": patch
---

fix: nested single token remove v2 validation
2 changes: 1 addition & 1 deletion src/entities/utils/isPoolToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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', () => {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b4cc94b

Please sign in to comment.