Skip to content

Commit

Permalink
remove extraneous change 2
Browse files Browse the repository at this point in the history
  • Loading branch information
fengtality committed Jul 26, 2024
1 parent 8707dc9 commit cca1510
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/connectors/uniswap/uniswap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export class Uniswap implements Uniswapish {
CurrencyAmount.fromRawAmount(baseToken, amount.toString());

logger.info(
`Fetching trade data for ${baseToken.address}-${quoteToken.address}.`,
`Fetching trade data for ${baseToken.address}-${quoteToken.address}.`
);

if (this._useRouter) {
Expand Down Expand Up @@ -291,7 +291,7 @@ export class Uniswap implements Uniswapish {
`${baseToken.symbol}.`
);
const expectedAmount = trade.minimumAmountOut(
this.getAllowedSlippage(allowedSlippage),
this.getAllowedSlippage(allowedSlippage)
);
return { trade, expectedAmount };
}
Expand Down Expand Up @@ -331,7 +331,7 @@ export class Uniswap implements Uniswapish {
undefined,
{
maxSwapsPerPath: this.maximumHops,
},
}
);
if (!route) {
throw new UniswapishPriceError(
Expand All @@ -341,18 +341,18 @@ export class Uniswap implements Uniswapish {
logger.info(
`Best trade for ${quoteToken.address}-${baseToken.address}: ` +
`${route.trade.executionPrice.invert().toFixed(6)} ` +
`${baseToken.symbol}.`,
`${baseToken.symbol}.`
);

const expectedAmount = route.trade.maximumAmountIn(
this.getAllowedSlippage(allowedSlippage),
this.getAllowedSlippage(allowedSlippage)
);
return { trade: route.trade, expectedAmount };
} else {
const pool = await this.getPool(quoteToken, baseToken, this._feeTier, poolId);
if (!pool) {
throw new UniswapishPriceError(
`priceSwapOut: no trade pair found for ${quoteToken.address} to ${baseToken.address}.`,
`priceSwapOut: no trade pair found for ${quoteToken.address} to ${baseToken.address}.`
);
}
const swapRoute = new Route([pool], quoteToken, baseToken);
Expand All @@ -374,7 +374,7 @@ export class Uniswap implements Uniswapish {
`${baseToken.symbol}.`
);
const expectedAmount = trade.maximumAmountIn(
this.getAllowedSlippage(allowedSlippage),
this.getAllowedSlippage(allowedSlippage)
);
return { trade, expectedAmount };
}
Expand Down Expand Up @@ -405,15 +405,15 @@ export class Uniswap implements Uniswapish {
nonce?: number,
maxFeePerGas?: BigNumber,
maxPriorityFeePerGas?: BigNumber,
allowedSlippage?: string,
allowedSlippage?: string
): Promise<Transaction> {
const methodParameters: MethodParameters = SwapRouter.swapCallParameters(
trade,
{
deadlineOrPreviousBlockhash: Math.floor(Date.now() / 1000 + ttl),
recipient: wallet.address,
slippageTolerance: this.getAllowedSlippage(allowedSlippage),
},
}
);

return this.chain.nonceManager.provideNonce(
Expand Down Expand Up @@ -443,7 +443,7 @@ export class Uniswap implements Uniswapish {
}
logger.info(JSON.stringify(tx));
return tx;
},
}
);
}

Expand Down Expand Up @@ -510,7 +510,7 @@ export class Uniswap implements Uniswapish {
});
const quoteTokenRawAmount = utils.defaultAbiCoder.decode(
['uint256'],
quoteCallReturnData,
quoteCallReturnData
);
const qouteTokenAmount = CurrencyAmount.fromRawAmount(
quoteToken,
Expand Down

0 comments on commit cca1510

Please sign in to comment.