Skip to content

Commit

Permalink
Remove unnecessary scaling.
Browse files Browse the repository at this point in the history
  • Loading branch information
johngrantuk committed Aug 25, 2021
1 parent 9557df3 commit 5f6c447
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
4 changes: 0 additions & 4 deletions test/lib/compareHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ export async function compareTest(
testData.tradeInfo.SwapAmount,
disabledOptions
);
// Normalize returnAmount
v1SwapData.returnAmount = v1SwapData.returnAmount.div(
bnum(10 ** testData.tradeInfo.ReturnAmountDecimals)
);

const fullSwapStart = performance.now();
const swapInfo: SwapInfo = await getFullSwap(
Expand Down
8 changes: 1 addition & 7 deletions test/lib/testHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,6 @@ export async function getV1Swap(
new v1BigNumber(costOutputToken),
epsOfInterest
);

const returnAmountScaled = scale(
bnum(returnAmount.toString()),
returnAmountDecimals
);

const smartOrderRouterMultiHopEpsOfInterestEnd = performance.now();
const fullSwapEnd = performance.now();

Expand All @@ -347,7 +341,7 @@ export async function getV1Swap(
return {
title: 'v1',
swaps: swapsV2,
returnAmount: returnAmountScaled,
returnAmount: bnum(returnAmount.toString()),
timeData,
};
}
Expand Down

0 comments on commit 5f6c447

Please sign in to comment.