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:
parent
089afa6c1a
commit
bf06025615
@ -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…
Reference in New Issue
Block a user