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 efaaf4fab2
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-08 14:05:45 -03:30
..
account-list-item Added storybook check to CI (#17092) 2023-01-21 00:57:46 +05:30
account-menu UX: Icon: Remove unwanted aria label (#17903) 2023-02-27 10:43:06 -06:00
add-network UX: Icon: Remove fa-exclamation-triangle usages (#17691) 2023-02-23 15:20:07 -06: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 Move desktop code to flask build type (#17960) 2023-03-06 19:35:00 +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 Part of 17670: Replace Typography with Text approve-content-card (#17753) 2023-02-16 18:33:35 -08:00
asset-list feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
asset-list-item Upgrading the Import Account modal (#17763) 2023-03-06 09:48:28 -08:00
beta-header UX: Icon: Stop using fa-times (#17811) 2023-02-27 10:42:02 -06: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-08 14:05:45 -03:30
confirmation-warning-modal UX: Icon: Remove fa-exclamation-triangle usages (#17691) 2023-02-23 15:20:07 -06:00
connected-accounts-list UX: Update three-dot icon for settings (#17558) 2023-02-15 08:39:46 -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 UX Icon: updated fa-exclamation-circle (#17879) 2023-02-24 12:52:11 -06:00
desktop-enable-button identify desktop is paired in the metrics event (#17892) 2023-03-02 14:55:27 -06:00
detected-token feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
dropdowns UX: Icon: Stop using fa-times (#17811) 2023-02-27 10:42:02 -06: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-02-16 07:26:14 -06: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 UX Icon: updated fa-exclamation-circle (#17879) 2023-02-24 12:52:11 -06: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 SRP hold to reveal (#17232) 2023-02-15 10:07:33 -08: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 UX: Update three-dot icon for settings (#17558) 2023-02-15 08:39:46 -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: Icon: Stop using fa-times (#17811) 2023-02-27 10:42:02 -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-02-16 07:26:14 -06:00
nft-default-image NFT: Replaced all the instances of collectibles with NFTs (#17741) 2023-02-17 00:53:29 +05:30
nft-details Fix nft test state (#17981) 2023-03-07 08:46:02 -06:00
nft-options NFT: Replaced all the instances of collectibles with NFTs (#17741) 2023-02-17 00:53:29 +05:30
nfts-detection-notice NFT: Replaced all the instances of collectibles with NFTs (#17741) 2023-02-17 00:53:29 +05:30
nfts-items Fix nft test state (#17981) 2023-03-07 08:46:02 -06:00
nfts-tab NFT: Replaced all the instances of collectibles with NFTs (#17741) 2023-02-17 00:53:29 +05:30
open-sea-whats-new-popover What's new - OpenSea security provider (#16831) 2023-02-27 10:20:22 -06:00
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-02-10 19:33:11 -06: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
security-provider-banner-message Open sea security provider warning message (#17662) 2023-02-23 08:38:09 -03:00
selected-account Updating Icon html element to span (#17790) 2023-02-22 14:42:50 -08:00
set-approval-for-all-warning UX: Icon: Remove fa-exclamation-triangle usages (#17691) 2023-02-23 15:20:07 -06:00
signature-request fix(17542): fix fiat currency display in few txn actions (#18011) 2023-03-08 16:05:55 +00:00
signature-request-original fix(17542): fix fiat currency display in few txn actions (#18011) 2023-03-08 16:05:55 +00:00
signature-request-siwe Open sea security provider warning message (#17662) 2023-02-23 08:38:09 -03: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: Update Settings Icon (#17561) 2023-02-26 20:42:03 -06:00
token-cell Updating Icon html element to span (#17790) 2023-02-22 14:42:50 -08: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 Updating Icon html element to span (#17790) 2023-02-22 14:42:50 -08: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 Transaction-list-item-details pop up to display the correct token information on token approve item (#17422) 2023-02-24 14:21:55 -05: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 Bridge tokens by redirecting to Portfolio from wallet overview page (#17952) 2023-03-06 11:34:06 -08:00
whats-new-popup feature: migrate design-system.ts (#17518) 2023-02-02 20:15:26 +00:00
app-components.scss Buy crypto by redirecting to onramp experience on pdapp instead of deposit popover (#17689) 2023-03-01 12:45:27 +04:00
menu-droppo.js Convert unit test render from enzyme to @testing-library/react. (#15091) 2022-08-03 13:30:43 -07:00