Skip to content

Commit

Permalink
chore: Refactor, use better naming for test flags.
Browse files Browse the repository at this point in the history
  • Loading branch information
johngrantuk committed Aug 6, 2024
1 parent c5b4287 commit e2a8be9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/abi/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export * from './authorizer';
export * from './balancerBatchRouter';
export * from './balancerQueries';
export * from './balancerBatchRouter';
export * from './balancerRelayer';
export * from './balancerRouter';
export * from './batchRelayerLibrary';
Expand Down
4 changes: 2 additions & 2 deletions test/entities/swaps/v3/swapV3.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ describe('SwapV3', () => {
swap,
wethIsEth: false,
outputTest: {
isExactOut: false,
testExactOutAmount: false,
percentage: 0.001,
},
});
Expand All @@ -1016,7 +1016,7 @@ describe('SwapV3', () => {
swap,
wethIsEth: false,
inputTest: {
isExactIn: false,
testExactInAmount: false,
percentage: 0.001,
},
});
Expand Down
12 changes: 6 additions & 6 deletions test/lib/utils/swapHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export async function assertSwapExactIn({
wethIsEth,
usePermit2Signatures = false,
outputTest = {
isExactOut: true,
testExactOutAmount: true,
percentage: 0,
},
}: {
Expand All @@ -55,7 +55,7 @@ export async function assertSwapExactIn({
wethIsEth: boolean;
usePermit2Signatures?: boolean;
outputTest?: {
isExactOut: boolean;
testExactOutAmount: boolean;
percentage: number;
};
}) {
Expand Down Expand Up @@ -139,7 +139,7 @@ export async function assertSwapExactIn({
expectedTokenOutDelta = 0n;
}

if (outputTest.isExactOut)
if (outputTest.testExactOutAmount)
expect(balanceDeltas).to.deep.eq([
expectedEthDelta,
expectedTokenInDelta,
Expand Down Expand Up @@ -169,7 +169,7 @@ export async function assertSwapExactOut({
wethIsEth,
usePermit2Signatures = false,
inputTest = {
isExactIn: true,
testExactInAmount: true,
percentage: 0,
},
}: {
Expand All @@ -181,7 +181,7 @@ export async function assertSwapExactOut({
wethIsEth: boolean;
usePermit2Signatures?: boolean;
inputTest?: {
isExactIn: boolean;
testExactInAmount: boolean;
percentage: number;
};
}) {
Expand Down Expand Up @@ -268,7 +268,7 @@ export async function assertSwapExactOut({
expectedTokenOutDelta = 0n;
}

if (inputTest.isExactIn)
if (inputTest.testExactInAmount)
expect(balanceDeltas).to.deep.eq([
expectedEthDelta,
expectedTokenInDelta,
Expand Down

0 comments on commit e2a8be9

Please sign in to comment.