Skip to content

Commit

Permalink
Fix code style issues with Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
lint-action committed Jan 11, 2022
1 parent 84b4480 commit ae2d481
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/providers/v3/quote-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,9 @@ export class V3QuoteProvider implements IV3QuoteProvider {
if (!quoteResult.success) {
const percent = (100 / amounts.length) * (index + 1);

const amountStr = amount.toFixed(Math.min(amount.currency.decimals, 2));
const amountStr = amount.toFixed(
Math.min(amount.currency.decimals, 2)
);
const routeStr = routeToString(route);
debugFailedQuotes.push({
route: routeStr,
Expand Down
16 changes: 12 additions & 4 deletions src/routers/alpha-router/functions/best-swap-route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,15 @@ export function getBestSwapRoute(
numSplits: routeAmounts.length,
amount: amount.toExact(),
quote: swapRoute.quote.toExact(),
quoteGasAdjusted: swapRoute.quoteGasAdjusted.toFixed(Math.min(swapRoute.quoteGasAdjusted.currency.decimals, 2)),
estimatedGasUSD: swapRoute.estimatedGasUsedUSD.toFixed(Math.min(swapRoute.estimatedGasUsedUSD.currency.decimals, 2)),
estimatedGasToken: swapRoute.estimatedGasUsedQuoteToken.toFixed(Math.min(swapRoute.estimatedGasUsedQuoteToken.currency.decimals, 2)),
quoteGasAdjusted: swapRoute.quoteGasAdjusted.toFixed(
Math.min(swapRoute.quoteGasAdjusted.currency.decimals, 2)
),
estimatedGasUSD: swapRoute.estimatedGasUsedUSD.toFixed(
Math.min(swapRoute.estimatedGasUsedUSD.currency.decimals, 2)
),
estimatedGasToken: swapRoute.estimatedGasUsedQuoteToken.toFixed(
Math.min(swapRoute.estimatedGasUsedQuoteToken.currency.decimals, 2)
),
},
`Found best swap route. ${routeAmounts.length} split.`
);
Expand Down Expand Up @@ -139,7 +145,9 @@ export function getBestSwapRouteBy(
protocol: p.protocol,
route: routeToString(p.route),
percent: p.percent,
quote: p.quoteAdjustedForGas.toFixed(Math.min(p.quoteToken.decimals, 2)),
quote: p.quoteAdjustedForGas.toFixed(
Math.min(p.quoteToken.decimals, 2)
),
}))
),
},
Expand Down
4 changes: 3 additions & 1 deletion src/routers/legacy-router/legacy-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,9 @@ export class LegacyRouter implements IRouter<LegacyRoutingConfig> {

for (let rq of routeQuotes) {
log.debug(
`Quote: ${rq.amount.toFixed(Math.min(rq.amount.currency.decimals, 2))} Route: ${routeToString(rq.route)}`
`Quote: ${rq.amount.toFixed(
Math.min(rq.amount.currency.decimals, 2)
)} Route: ${routeToString(rq.route)}`
);
}

Expand Down

0 comments on commit ae2d481

Please sign in to comment.