Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
alfetopito committed Jan 20, 2025
1 parent 47d86e6 commit 40a65c3
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface ExecutionPriceParams {
*/
export function convertAmountToCurrency(
amount: CurrencyAmount<Currency>,
targetCurrency: Currency
targetCurrency: Currency,
): CurrencyAmount<Currency> {
const { numerator, denominator } = amount

Expand All @@ -34,12 +34,12 @@ export function convertAmountToCurrency(
const decimalsDiff = Math.abs(inputDecimals - outputDecimals)
const decimalsDiffAmount = rawToTokenAmount(1, decimalsDiff)

const fixedNumenator =
const fixedNumerator =
inputDecimals < outputDecimals
? JSBI.multiply(numerator, decimalsDiffAmount)
: JSBI.divide(numerator, decimalsDiffAmount)

return CurrencyAmount.fromFractionalAmount(targetCurrency, fixedNumenator, denominator)
return CurrencyAmount.fromFractionalAmount(targetCurrency, fixedNumerator, denominator)
}

export function calculateExecutionPrice(params: ExecutionPriceParams): Price<Currency, Currency> | null {
Expand All @@ -62,7 +62,7 @@ export function calculateExecutionPrice(params: ExecutionPriceParams): Price<Cur
baseAmount: inputCurrencyAmount,
quoteAmount: convertAmountToCurrency(
inputCurrencyAmount.subtract(feeAmount).multiply(marketRateFixed),
outputCurrencyAmount.currency
outputCurrencyAmount.currency,
),
})
const marketPrice = isInverted ? marketPriceRaw.invert() : marketPriceRaw
Expand Down

0 comments on commit 40a65c3

Please sign in to comment.