mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-27 04:46:10 +01:00
c044b6f2b4
* Alternative savings fix * Further required changes to savings fix * Further fix to savings calculations that properly accounts for metamask fees * metaMaskFeeInEth property on quotes to decimal string * Fix swaps controller unit tests * Improve documentation in swaps controller * Prevent getMedianEthValueQuote from mutation passed quotes array with .sort() call * Another fix and refactor to savings calculations in _findTopQuoteAndCalculateSavings Cleaner structuring of conditionals for setting tokenValueOfQuoteForSorting, ethValueOfQuote and metaMaskFeeInEth in swaps controller Stop subtracting medianMetaMaskFee from savings, but include it in savings data Another fix and refactor to savings calculations in _findTopQuoteAndCalculateSavings * Add and update unit tests for _findTopQuoteAndCalculateSavings * Improve calculation of overallValueOfQuoteForSorting for case where ETH is the source token * Clean up getMedianEthValueQuote code, test and comments * Clean up _findTopQuoteAndCalculateSavings, create test input and expected results helper functions * Update getMedianEthValueQuote to account for multiple quotes with overall values equal to the median * Add jsdoc comment for meansOfQuotesFeesAndValue * Fix jsdoc comment for getMedianEthValueQuote |
||
---|---|---|
.. | ||
network | ||
permissions | ||
transactions | ||
cached-balances-test.js | ||
detect-tokens-test.js | ||
ens-controller-test.js | ||
incoming-transactions-test.js | ||
metamask-controller-test.js | ||
preferences-controller-test.js | ||
swaps-test.js | ||
token-rates-controller.js |