1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/ui/components/app
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
..
account-list-item Added storybook check to CI (#17092) 2023-01-21 00:57:46 +05:30
account-menu UX: Replace all fa-bell instances with Notification icon (#17524) 2023-03-02 12:39:41 +00:00
add-network feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
advanced-gas-controls Added storybook check to CI (#17092) 2023-01-21 00:57:46 +05:30
advanced-gas-fee-popover feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
advanced-gas-inputs Relocate conversion utils to shared/modules/conversion.utils.js (#17319) 2023-01-20 11:04:37 -06:00
alerts Convert shared/constants/hardware-wallets.js -> Typescript (#17310) 2023-01-20 09:14:40 -06:00
app-header UX: Icons: Remove usage of chevron fa- icons (#17668) 2023-03-02 12:41:53 +00:00
app-loading-spinner swap hex colors in ui/components/app folder (#14189) 2022-03-25 08:32:36 -07:00
approve-content-card Disable fiat conversion in Approve Screen when Show balance and token price checker is OFF (#17443) 2023-02-03 12:13:19 -05:00
asset-list feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
asset-list-item UX: Icons: Remove usage of chevron fa- icons (#17668) 2023-03-02 12:41:53 +00:00
beta-header feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
cancel-button Final conversion of tests from enzyme to @testing-library/react (#16862) 2023-01-17 07:51:35 -08:00
cancel-speedup-popover feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
confirm-page-container Use tokenList to get token details, when available, in getTokenStanda… (#17891) 2023-03-09 09:59:14 +00:00
confirmation-warning-modal feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
connected-accounts-list Fix #17441 - Update all MenuItem instances to use new icons (#17468) 2023-01-31 08:47:00 -06:00
connected-accounts-permissions [FLASK] Expose transaction origin to transaction insight snaps (#16671) 2022-12-01 14:38:56 +01:00
connected-sites-list Fix connected site styling (#15409) 2022-08-09 12:29:38 -05:00
connected-status-indicator feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
contact-list Token detection V2 Flag Removal and Re-introducing the use of legacy token list when token detection is OFF (#15138) 2022-08-09 22:56:25 -02:30
create-new-vault Added storybook check to CI (#17092) 2023-01-21 00:57:46 +05:30
currency-input Convert ui/helpers/constants/common to typescript (#17348) 2023-01-25 09:47:02 -06:00
custom-spending-cap feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
deposit-popover feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
detected-token feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
dropdowns feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
edit-gas-display feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
edit-gas-fee-button UX: Icons: Remove usage of chevron fa- icons (#17668) 2023-03-02 12:41:53 +00:00
edit-gas-fee-popover feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
edit-gas-popover feature: convert level 32 files to typescript (#17390) 2023-01-27 18:28:03 +00:00
flask Sort permissions based on weight (#17660) 2023-02-08 15:28:48 +01:00
gas-details-item feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
gas-timing Convert actions.js to typescript (#17446) 2023-02-03 11:56:44 -06:00
hold-to-reveal-button feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
home-notification Added storybook check to CI (#17092) 2023-01-21 00:57:46 +05:30
import-token-link Convert actions.js to typescript (#17446) 2023-02-03 11:56:44 -06:00
info-box Added storybook check to CI (#17092) 2023-01-21 00:57:46 +05:30
ledger-instruction-field feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
loading-network-screen fix infura rpc detection (#16585) 2022-11-23 21:30:45 +00:00
menu-bar Fix #17441 - Update all MenuItem instances to use new icons (#17468) 2023-01-31 08:47:00 -06:00
metamask-template-renderer feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
metamask-translation Added storybook check to CI (#17092) 2023-01-21 00:57:46 +05:30
modal Continue converting tests from enzyme to @testing-library/react. (#15941) 2022-09-23 09:41:35 -05:00
modals UX: Update block explorer icon (#17562) 2023-02-09 10:21:51 -06:00
multilayer-fee-message Remove usages of Conversion util in components folder in favor of Numeric (#17333) 2023-01-23 13:30:43 -06:00
multiple-notifications Update media query instances (#15068) 2022-08-04 09:03:02 -05:00
network-account-balance-header feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
network-display UX: Icons: Remove usage of chevron fa- icons (#17668) 2023-03-02 12:41:53 +00:00
nft-default-image converted collectibles files to nfts (#17658) 2023-02-08 20:04:56 +05:30
nft-details UX: Icons: Remove usage of chevron fa- icons (#17668) 2023-03-02 12:41:53 +00:00
nft-options converted collectibles files to nfts (#17658) 2023-02-08 20:04:56 +05:30
nfts-detection-notice converted collectibles files to nfts (#17658) 2023-02-08 20:04:56 +05:30
nfts-items UX: Icons: Remove usage of chevron fa- icons (#17668) 2023-03-02 12:41:53 +00:00
nfts-tab converted collectibles files to nfts (#17658) 2023-02-08 20:04:56 +05:30
permission-page-container Add hardcoded list of human-readable snap names (#17595) 2023-02-06 11:05:57 +01:00
permissions-connect-footer Consolidating Zendesk URLs in to constants file (#15669) 2022-08-23 09:19:31 -05:00
permissions-connect-header feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
permissions-connect-permission-list UX: Replace all fa-bell instances with Notification icon (#17524) 2023-03-02 12:39:41 +00:00
qr-hardware-popover feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
recovery-phrase-reminder feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
selected-account feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
set-approval-for-all-warning feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
signature-request fix(17542): fix fiat currency display in few txn actions (#18011) 2023-03-09 09:56:14 +00:00
signature-request-original fix(17542): fix fiat currency display in few txn actions (#18011) 2023-03-09 09:56:14 +00:00
signature-request-siwe feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
srp-input feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
step-progress-bar Overall CSS #13441 (#13902) 2022-05-16 13:38:04 -05:00
tab-bar UX: Icons: Remove usage of chevron fa- icons (#17668) 2023-03-02 12:41:53 +00:00
token-cell UX: Icons: Remove usage of chevron fa- icons (#17668) 2023-03-02 12:41:53 +00:00
token-list Integrate TokensController (#11552) 2021-09-10 12:37:19 -05:00
token-list-display Feat/hide 0 balances (#13306) 2022-02-02 12:32:16 +01:00
transaction-activity-log UX: Icons: Remove usage of chevron fa- icons (#17668) 2023-03-02 12:41:53 +00:00
transaction-alerts feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
transaction-breakdown Convert ui/helpers/constants/common to typescript (#17348) 2023-01-25 09:47:02 -06:00
transaction-decoding feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
transaction-detail feature: convert level 32 files to typescript (#17390) 2023-01-27 18:28:03 +00:00
transaction-detail-item feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
transaction-icon Convert Transaction constants to typescript (#17149) 2023-01-18 08:47:29 -06:00
transaction-list Added storybook check to CI (#17092) 2023-01-21 00:57:46 +05:30
transaction-list-item feature: convert level 32 files to typescript (#17390) 2023-01-27 18:28:03 +00:00
transaction-list-item-details Convert actions.js to typescript (#17446) 2023-02-03 11:56:44 -06:00
transaction-status-label Convert Transaction constants to typescript (#17149) 2023-01-18 08:47:29 -06:00
user-preferenced-currency-display Convert ui/helpers/constants/common to typescript (#17348) 2023-01-25 09:47:02 -06:00
user-preferenced-currency-input Continue converting tests from enzyme to @testing-library/react (#16175) 2022-10-20 11:20:49 -07:00
user-preferenced-token-input Continue converting tests from enzyme to @testing-library/react (#16175) 2022-10-20 11:20:49 -07:00
wallet-overview UX: Icons: Use proper send icon on wallet and token overview pages (#17720) 2023-02-15 10:26:21 -07:00
whats-new-popup feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
app-components.scss converted collectibles files to nfts (#17658) 2023-02-08 20:04:56 +05:30
menu-droppo.js Convert unit test render from enzyme to @testing-library/react. (#15091) 2022-08-03 13:30:43 -07:00