Fix "BigNumber Error: times() number type has more than 15 significant digits:" (#12802)

feature/default_network_editable
Daniel 3 years ago committed by Dan Miller
parent baf049afb8
commit 61e0526d58
  1. 4
      app/scripts/controllers/swaps.js

@ -746,7 +746,7 @@ export default class SwapsController {
const conversionRateForSorting = tokenConversionRate || 1;
const ethValueOfTokens = decimalAdjustedDestinationAmount.times(
conversionRateForSorting,
conversionRateForSorting.toString(10),
10,
);
@ -768,7 +768,7 @@ export default class SwapsController {
quote.ethValueOfTokens = ethValueOfTokens.toString(10);
quote.overallValueOfQuote = overallValueOfQuoteForSorting.toString(10);
quote.metaMaskFeeInEth = metaMaskFeeInTokens
.times(conversionRateForCalculations)
.times(conversionRateForCalculations.toString(10))
.toString(10);
}

Loading…
Cancel
Save