Commit 1f304d6c authored by Miguel Cervera's avatar Miguel Cervera Committed by GitHub

Default FOT calculation to true (#155)

parent 2f26b23d
...@@ -181,7 +181,7 @@ export class Pair { ...@@ -181,7 +181,7 @@ export class Pair {
*/ */
public getOutputAmount( public getOutputAmount(
inputAmount: CurrencyAmount<Token>, inputAmount: CurrencyAmount<Token>,
calculateFotFees: boolean = false calculateFotFees: boolean = true
): [CurrencyAmount<Token>, Pair] { ): [CurrencyAmount<Token>, Pair] {
invariant(this.involvesToken(inputAmount.currency), 'TOKEN') invariant(this.involvesToken(inputAmount.currency), 'TOKEN')
if (JSBI.equal(this.reserve0.quotient, ZERO) || JSBI.equal(this.reserve1.quotient, ZERO)) { if (JSBI.equal(this.reserve0.quotient, ZERO) || JSBI.equal(this.reserve1.quotient, ZERO)) {
...@@ -271,7 +271,7 @@ export class Pair { ...@@ -271,7 +271,7 @@ export class Pair {
*/ */
public getInputAmount( public getInputAmount(
outputAmount: CurrencyAmount<Token>, outputAmount: CurrencyAmount<Token>,
calculateFotFees: boolean = false calculateFotFees: boolean = true
): [CurrencyAmount<Token>, Pair] { ): [CurrencyAmount<Token>, Pair] {
invariant(this.involvesToken(outputAmount.currency), 'TOKEN') invariant(this.involvesToken(outputAmount.currency), 'TOKEN')
const percentAfterBuyFees = calculateFotFees ? this.derivePercentAfterBuyFees(outputAmount) : ZERO_PERCENT const percentAfterBuyFees = calculateFotFees ? this.derivePercentAfterBuyFees(outputAmount) : ZERO_PERCENT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment