1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

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

This commit is contained in:
Daniel 2021-11-23 17:33:32 +01:00 committed by GitHub
parent 089afa6c1a
commit bf06025615
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}