1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/ui/pages
Dan J Miller 7bc2370be5 Use tokenList to get token details, when available, in getTokenStanda… (#17891)
* Use tokenList to get token details, when available, in getTokenStandardAndDetails

Previously, every call to getTokenStandardAndDetails would fetch data via the provider.
This would result in at least 3 network requests whenever that method is called for an
ERC20 token, contributing to unneccesary loading and lagging in multiple places.
This commit takes advantage of stored data we already have available to avoid the unnecessary
loading.

* Lint fix

* Fix build-quote test

* bump coverage targets

* Pass provider to token-util, for use in ethers Contract module

* Check all possible sources of ERC20 token data before async call to assetsContractController

* Add and update tests

* Update app/scripts/metamask-controller.js

Co-authored-by: Alex Donesky <adonesky@gmail.com>

* Update app/scripts/metamask-controller.js

Co-authored-by: Alex Donesky <adonesky@gmail.com>

* Remove unnecessary this.ethQuery changes

* Use metamask-eth-abis instead of human-standard-token-abi in token-util.ts

* Add explanatory comments to getTokenStandardAndDetails

* lint fix

* Cleanup

* fix test

* Update app/scripts/metamask-controller.js

Co-authored-by: Alex Donesky <adonesky@gmail.com>

* update error message

---------

Co-authored-by: Alex Donesky <adonesky@gmail.com>
2023-03-09 09:59:14 +00:00
..
add-nft converted collectibles files to nfts (#17658) 2023-02-08 20:04:56 +05:30
asset UX: Icons: Remove usage of chevron fa- icons (#17668) 2023-03-02 12:41:53 +00:00
confirm-add-suggested-token Use PageContainerFooter to render footer on all confirmation pages (#17316) 2023-01-23 20:52:12 +05:30
confirm-approve Disable fiat conversion in Approve Screen when Show balance and token price checker is OFF (#17443) 2023-02-03 12:13:19 -05:00
confirm-contract-interaction Convert Transaction constants to typescript (#17149) 2023-01-18 08:47:29 -06:00
confirm-decrypt-message fix(17542): fix fiat currency display in few txn actions (#18011) 2023-03-09 09:56:14 +00:00
confirm-deploy-contract Added storybook check to CI (#17092) 2023-01-21 00:57:46 +05:30
confirm-encryption-public-key fix(17542): fix fiat currency display in few txn actions (#18011) 2023-03-09 09:56:14 +00:00
confirm-import-token Added storybook check to CI (#17092) 2023-01-21 00:57:46 +05:30
confirm-send-ether Added storybook check to CI (#17092) 2023-01-21 00:57:46 +05:30
confirm-send-token Added storybook check to CI (#17092) 2023-01-21 00:57:46 +05:30
confirm-signature-request fix(17542): fix fiat currency display in few txn actions (#18011) 2023-03-09 09:56:14 +00:00
confirm-token-transaction-base Convert ui/helpers/constants/common to typescript (#17348) 2023-01-25 09:47:02 -06:00
confirm-transaction Fix state in confirm transaction (#17838) 2023-03-02 11:38:53 +00:00
confirm-transaction-base Fix state in confirm transaction (#17838) 2023-03-02 11:38:53 +00:00
confirm-transaction-switch Convert Transaction constants to typescript (#17149) 2023-01-18 08:47:29 -06:00
confirmation UX: Icons: Remove usage of chevron fa- icons (#17668) 2023-03-02 12:41:53 +00:00
connected-accounts Added storybook check to CI (#17092) 2023-01-21 00:57:46 +05:30
connected-sites Added storybook check to CI (#17092) 2023-01-21 00:57:46 +05:30
create-account Put hardware wallets behind an HARDWARE_WALLETS_MV3 flag (#17354) 2023-01-25 17:42:08 -03:30
error Add more tracking for MetaMask (#15462) 2022-08-11 19:33:33 +02:00
home converted collectibles files to nfts (#17658) 2023-02-08 20:04:56 +05:30
import-token feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
keychains Convert actions.js to typescript (#17446) 2023-02-03 11:56:44 -06:00
lock Various test files converting to @testing-library/react. (#15470) 2022-08-08 13:28:49 -07:00
mobile-sync Added storybook check to CI (#17092) 2023-01-21 00:57:46 +05:30
notifications UX: Icons: Remove usage of chevron fa- icons (#17668) 2023-03-02 12:41:53 +00:00
onboarding-flow fix: fix non-critical warning in tests (#17567) 2023-02-02 20:37:53 +00:00
permissions-connect UX: Icons: Remove usage of chevron fa- icons (#17668) 2023-03-02 12:41:53 +00:00
routes converted collectibles files to nfts (#17658) 2023-02-08 20:04:56 +05:30
send UX: Icons: Remove usage of chevron fa- icons (#17668) 2023-03-02 12:41:53 +00:00
settings UX: Icon: Restore missing back chevron in settings (#17916) 2023-03-06 11:20:02 +00:00
swaps Use tokenList to get token details, when available, in getTokenStanda… (#17891) 2023-03-09 09:59:14 +00:00
token-allowance Disable fiat conversion in Approve Screen when Show balance and token price checker is OFF (#17443) 2023-02-03 12:13:19 -05:00
token-details feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
unlock-page Convert actions.js to typescript (#17446) 2023-02-03 11:56:44 -06:00
index.js Renamed metametrics.new.js to metametrics.js (#14327) 2022-04-01 14:11:12 -05:00
pages.scss converted collectibles files to nfts (#17658) 2023-02-08 20:04:56 +05:30