1
0
Fork 0
metamask-extension/package.json

635 lines
36 KiB
JSON
Raw Permalink Normal View History

2015-08-01 03:38:02 +02:00
{
2015-10-10 08:14:18 +02:00
"name": "metamask-crx",
2023-08-19 11:21:15 +02:00
"version": "11.0.0",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/MetaMask/metamask-extension.git"
},
2016-01-15 03:26:54 +01:00
"scripts": {
"start": "yarn build:dev dev --apply-lavamoat=false --snow=false",
"start:mv3": "ENABLE_MV3=true yarn build:dev dev --apply-lavamoat=false",
"start:flask": "yarn start --build-type flask",
"start:mmi": "yarn start --build-type mmi",
"start:lavamoat": "yarn build:dev dev --apply-lavamoat=true",
"dist": "yarn build dist",
"build": "yarn lavamoat:build",
"build:dev": "node development/build/index.js",
"start:test": "SEGMENT_HOST='https://api.segment.io' SEGMENT_WRITE_KEY='FAKE' SENTRY_DSN_DEV=https://fake@sentry.io/0000000 PORTFOLIO_URL=http://127.0.0.1:8080 yarn build:dev testDev",
"start:test:mv3": "ENABLE_MV3=true SEGMENT_HOST='https://api.segment.io' SEGMENT_WRITE_KEY='FAKE' SENTRY_DSN_DEV=https://fake@sentry.io/0000000 PORTFOLIO_URL=http://127.0.0.1:8080 yarn build:dev testDev",
"benchmark:chrome": "SELENIUM_BROWSER=chrome ts-node test/e2e/benchmark.js",
"mv3:stats:chrome": "SELENIUM_BROWSER=chrome ENABLE_MV3=true ts-node test/e2e/mv3-perf-stats/index.js",
"user-actions-benchmark:chrome": "SELENIUM_BROWSER=chrome ts-node test/e2e/user-actions-benchmark.js",
"benchmark:firefox": "SELENIUM_BROWSER=firefox ts-node test/e2e/benchmark.js",
"build:test": "SEGMENT_HOST='https://api.segment.io' SEGMENT_WRITE_KEY='FAKE' SENTRY_DSN_DEV=https://fake@sentry.io/0000000 PORTFOLIO_URL=http://127.0.0.1:8080 yarn build test",
"build:test:flask": "yarn build test --build-type flask",
"build:test:mv3": "ENABLE_MV3=true SEGMENT_HOST='https://api.segment.io' SEGMENT_WRITE_KEY='FAKE' SENTRY_DSN_DEV=https://fake@sentry.io/0000000 PORTFOLIO_URL=http://127.0.0.1:8080 yarn build test",
"build:test:dev:mv3": "ENABLE_MV3=true SEGMENT_HOST='https://api.segment.io' SEGMENT_WRITE_KEY='FAKE' SENTRY_DSN_DEV=https://fake@sentry.io/0000000 PORTFOLIO_URL=http://127.0.0.1:8080 yarn build:dev testDev --apply-lavamoat=false",
Version v9.5.0 RC (#10944) * add trezor HD path for ledger wallets (#10616) Co-authored-by: Barry Gitarts <bgitarts@gmail.com> * Replace logic for eth swap token in fetchQuotesAndSetQuoteState with getSwapsEthToken call (#10624) * Ensure permission log will only store JSON-able data (#10524) * remove transactionCategory in favor of more types (#10615) * remove transactionCategory in favor of more types * remove reference to STANDARD in stubs * Removing double click bug from delete custom network modal (#10628) Fixes MetaMask/metamask-extension#10626 * Hide zero balance tokens at useTokenTracker layer (#10630) * Setting balance to 0x0 when the original value is undefined (#10634) * fix: speedup cancellation (#10579) fixes #7305 * no more node:console (#10640) * prefer chainId over networkId in most cases (#10594) * Move swaps constants to the shared constants directory (#10614) * Position the 3dot menu in the same spot on asset screen and home screen (#10642) * Ensure swaps detail height doesn't create jump in vertical height (#10644) * Fix: ETH 'token' now only appears once in the swaps to and from dropdowns. (#10650) * Prevent network menu highlighting (#10643) * Allow TextField to receive min and max attributes (#10656) * colocate tests in flat structure (#10655) * Fixing migration script generation paths (#10664) * Improve specificity of `test:unit:lax` npm script (#10661) The unit test npm script `test:unit:lax` is now more specific about which tests files to exclude. An `--ignore` CLI option is used to specify the files to ignore, rather than using the braces glob syntax to ignore them from the target glob itself. This makes the option easier to update going forward as we move more tests into the "strict" group, because the options are exactly the same between the two scripts. It also ensures we don't accidentally exclude other subdirectories that happen to also be named `permissions`. In trying to implement this, I stumbled at first because mocha expects the ignore pattern to be a relative path if the target is a relative path (i.e. they need to both start with `./` or neither). The script `test:unit:strict` has been updated to use a relative target pattern for consistency. * Swaps support for local testnet (#10658) * Swaps support for local testnet * Create util method for comparison of token addresses/symbols to default swaps token * Get chainId from txMeta in _trackSwapsMetrics of transaction controller * Add comment to document purpose of getTransactionGroupRecipientAddressFilter * Use isSwapsDefaultTokenSymbol in place of repeated defaultTokenSymbol comparisons in build-quote.js * fix: replace dnode background with JSON-RPC (#10627) fixes #10090 * Don't render faucet row in deposit modal for custom chains (#10674) Fixes MetaMask/metamask-extension#10038 * Change 'Send ETH' title to 'Send' (#10651) * Fixing incorrectly typed token decimal attribute (#10666) * refactor incoming tx controller (#10639) * make migration more safe (#10689) * Adding default properties to NetworkForm (#10682) Fixes MetaMask/metamask-extension#10681 * deps - remove "remotedev-server" (#10687) * deps - remove remotedev-server * Remove stale references from allow-scripts config Any packages that are no longer in the dependency tree have been removed from the `allow-scripts` config. Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Excluding sourcemaps comment in production builds (#10695) * Excluding sourcemaps comment in production builds Fixes MetaMask/metamask-extension#7077 * Fix source map explorer script The source map explorer script now re-adds the source map comment to each file to ensure the source map visualization still works. Each module with a sourcemap is copied to a temporary directory along with the module it corresponds to, and from there it's passed into `source-map-explorer`. This should ensure the resulting visualization matches what it was before. Everything has been moved inside of functions to generally improve readability, and to allow the use of local variables. Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Delete setupFetchDebugging.js (#10636) * Delete setupFetchDebugging.js * remove fetch-debugging (now handled corrently by sentry) * resolve issue with missing template error (#10692) * resolve issue with missing template error * also apply filtering to confirmation page * rename variable * Add MetaMask to list of BIP44 HD path examples (#10703) The "BIP44 Standard" HD path option in the Ledger connect flow listed only Trezor as an example. It seemed appropriate to include MetaMask as well, since we use the same path. This helps users who have imported their MetaMask seed phrase onto a Ledger device to discover this option. * Removing hard references to 12 word seed phrases in copy (#10704) Adding translation entry for "Wallet Seed" Fixed label padding issue by adding missing CSS rule * rule out empty string for symbol (#10712) * fix: remove unused `metamask.rpcUrl` from redux state + fix tests to reflect that (#10714) * Fix 10706 - Prevent autocomplete from add token input (#10700) * Fix mismatchedChain typo in custom network approval screen (#10723) * Fix 10562 - Hide the suggested token pane when not on Mainnet or test network (#10702) * Update @metamask/controllers to v6.2.1 (#10701) * Additional swaps network support (#10721) * Add swaps support for bnc chain * Use single default token address in shared/constants/swaps * ci - cache deps before patch-package (#10735) * ci - cache deps before patch-package * ci - bump dep cache number (cache break) * build - refactor build system for easier configuration (#10718) * build - refactor build system for easier configuration of before and after bundle * build - fix dependenciesToBundle option * build - fix bify external options and other config * build - refactor for cleanliness * build - fix minify argument * build - fix sourcemaps setup * scripts - refactor setupBundlerDefaults in anticipation of factor bundles * build - scripts - remove unused pipeline label * build - scripts - make filepath entry optional * build - scripts - rename filepath and filename options to entryFilepath and destFilepath * Update development/build/scripts.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * security - update SES lockdown (#10663) * update ses * build - reference ses directly * deps - unify regenerator-runtime versions on 0.13.7 * patches - apply regenerator-runtime ses compat patch\nhttps://github.com/facebook/regenerator/pull/411 * patches - patch regenerator-runtime for latest ses fix * reduc patch, new lockdown severe override taming * updated redux patch * update redux patch for production * ignore lockdown in lint * deps - bump patch-package just in case * trailing comma * remove ses as dep * fix path for frozen promise * remove js extension in lockdown require * Revert "ignore lockdown in lint" This reverts commit 8cefdc94dd25d7781bb09eed8af36441397676da. * Revert "build - reference ses directly" This reverts commit 30371a377dcdd781c1bf9abe55e9c8ae34da26b5. * deps - update ses * Revert "fix path for frozen promise" This reverts commit 966e4c60921a25befe8ca8dea58313cc25852f72. Co-authored-by: kumavis <aaron@kumavis.me> * Allow 11 characters in symbol for RPC (#10670) * Add error in RPC for zero length symbols * Increase RPC symbol length allowed to 11 * Add RPC tests for new symbol length checks * eth-block-tracker@5.0.1 (#10737) * Ensure swaps gas prices are fetched from the correct chain specific endpoint (#10744) * Ensure swaps gas prices are fetched from the correct chain specific endpoint * Just rely on fetchWithCache to cache swaps gas prices, instead of directly using storage in getSwapsPriceEstimatesLastRetrieved * Empty commit * update @metamask/etherscan-link to v2.0.0 (#10747) * Use correct block explorer name and link in swaps when on custom network (#10743) * Use correct block explorer name and link in swaps when on custom network. * Fix up custom etherscan link code in build-quote.js * Use blockExplorerUrl hostname instead of 'blockExplorerBaseUrl' * Use correct etherscan-link method for token links in build-quote * Create correct token link in build-quote for mainnet AND custom networks * Block explorer url improvements in awaiting-swap.js and build-quote.js * Use swapVerifyTokenExplanation message with substitutable block explorer for all applicable locales * Ensure that block explorer links are not shown in awaiting-swap if no url is available * Add New Zealand Dollar to currency options (#10746) * Ensure that the correct default currency symbols are used for fees on the view quote screen (#10753) * Fix 10517 - Prevent tokens without addresses from being added to token list (#10593) * Updating y18n and netmask to resolve dependency issues (#10765) netmask@1.0.6 -> 2.0.1, y18n@3.2.1 -> 3.2.2, y18n@4.0.0 -> 4.0.1 * Refactor Tx State Manager (#10672) Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Ensure that the approval fee in the swaps custom gas modal is in network specific currency (#10763) * Ensure that priceSlippage fiat amounts are always shown in view-quote.js (#10762) * Use network specific swaps contract address when checking swap contract token approval (#10774) * Build - refactor background process to use html (#10769) * build - declare background as html * build - fill in empty file when a missing file is expected * lint - fix * Update development/build/manifest.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Update development/build/manifest.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * build - fix use of empty file to replace unused js files (#10780) * cache lint results for faster repeat execution (#10773) * eslint perf improvement (#10775) * Improve detection of task process exit (#10776) Our build script waits for the `close` event to determine whether the task has exited. The `exit` event is a better representation of this, because if a stream is shared between multiple processes, the process may exit without the `close` event being emitted. We aren't sharing streams between processes, so this edge case doesn't apply to us. This just seemed like a more suitable event to listen to, since we care about the process exiting not the stream ending. See this description of the `close` event from the Node.js documentation [1]: >The `'close'` event is emitted when the stdio streams of a child >process have been closed. This is distinct from the `'exit'` event, >since multiple processes might share the same stdio streams. And see this description of the `exit` event: >The `'exit'` event is emitted after the child process ends. [1]: https://nodejs.org/docs/latest-v14.x/api/child_process.html#child_process_event_exit * Rewrite changelog script from Bash to JavaScript (#10782) The `auto-changelog` script has been rewritten from Bash to JavaScript. Functionally it should behave identically. * Refactoring ethereum-on.spec.js to use fixtures (#10778) * Remove useless negation (#10787) !contentComponent always evaluates to true * Remove date from changelog release header (#10790) New changelog release headers now omit the date. These headers are added automatically when a new release branch is created, and that rarely ends up being the actual date of the release, so these dates have all been inaccurate anyway. The date will be re-added to the changelog later as part of a new script, after a release has been published. * Remove script for creating master sync PR (#10791) The script responsible for creating the "Sync `master` with `develop`" PR has been removed. We will soon be eliminating the need for a `master` branch altogether, so we don't need this anymore. Also, this script hasn't been running correctly in a long time. We've been creating this PR manually. * Add changelog entries under release candidate header (#10784) Instead of always placing new changelog entries under the "Current Develop Branch" header, the changelog script now places them under the header for the current release if that release has not yet been tagged. This eliminates one manual step from the release process. Relates to #10752 * Prevent duplicate changelog entries (#10786) The changelog update script now prevents duplicate entries from being added. Specifically, it will ensure that if a PR has been referenced already in an entry, it will not add it again. This should prevent it from adding duplicate entries for changes that were cherry-picked into hotfix releases. Note that this duplication prevention only works for entries containing a PR number. We don't have any way to prevent duplicate entries yet in cases where we don't know the associated PR. We will be preventing this possibility entirely pretty soon in some upcoming release automation changes though, so I'm not concerned about this omission. * Set the BSC_CONTRACT_ADDRESS to lowercase (#10800) * only applies rules to the appropriate files (#10788) * upgrade eslint deps (#10789) * Ensure correct primary currency image is displayed on home screen and token list (#10777) * Add release header when updating changelog (#10794) The changelog update script now adds a release header if it doesn't find one already that matches the current release candidate version. * remove node-sass dependency (#10797) * Add support for locators into driver abstraction (#10802) * Update changelog headers and fix dates (#10805) The changelog release header format has been updated to match the "keep a changelog" [1] format. Each header is now the bracketed version number followed by a dash, then the release date in ISO-8601 format. The release dates in each header were also updated to match the date of the corresponding GitHub Release [2]. Many of these dates were incorrect because they were set on the day we created the release candidate, rather than on the day of release. Any changelog release entries without a corresponding GitHub release was left with the date already specified. The three oldest release headers were missing dates. For the first two, I used the date of the version bump commit. For the third, I removed it since no changes were listed anyway, and it represented a range of releases rather than a single one. The `auto-changelog.js` script has been updated to account for this new format as well. [1]: https://keepachangelog.com/en/1.0.0/ [2]: https://github.com/MetaMask/metamask-extension/releases * Update the changelog when creating an RC (#10795) The changelog will now be automatically updated when a release branch is created. A new release header along with changelog entries for any new commits will be added. Note that this changelog will still need to be manually cleaned up, but it's one less manual step at least. The old Bash script for adding a new release header to the changelog has been removed, as that functionality is now built into the changelog update script. A new script has been added to commit any changes made to the manifest and changelog. This step used to happen at the end of the bump manifest version script, but now the changelog update relies upon the manifest version bump happening first, so it needed to be re-ordered. The changes should only be committed on the first run of the branch, as it's contingent upon the manifest changing (due to the version bump). Further changelog updates won't trigger new automatic commits. * Refactoring address-book.spec.js to use fixtures (#10804) * Refactoring send-edit.spec.js to use fixtures (#10792) * Fix _getPermittedAccounts type safety (#10819) * Removing unnecessary params from withFixtures function call. (#10831) * Add links to release headers (#10808) Each release header now includes a link to the range of commits included with that release. These links are at the end of the document, in accordance with the "keep a changelog" [1] format. For the purpose of this changelog, the "previous release" is the most recent release mentioned in the changelogs. The diffs ignore any releases that were omitted from the changelog. This is mainly an issue with older releases, so it seemed acceptable. All releases have been documented for a couple of years now, and will be going forward as well. The name of the "Current Develop Branch" section was changed to "Unreleased" to confirm with "keep a changelog". The `auto-changelog.js` script has been updated to update/add these links whenever adding a new release header as well. [1]: https://keepachangelog.com/en/1.0.0/ * Refactoring permissions.spec.js to use fixtures (#10829) * Add validation for the `fee` property from the `/trades` API response (#10836) * Refactoring signature-request.spec.js to use fixtures (#10820) * use locator abstraction in tests folder (#10833) * Move BSC chain ID, rename some BSC-related vars (#10807) * Add categories to each changelog release (#10837) Each changelog release now has category headers. The standard "keep a changelog" [1] categories are used, along with the addition of "Uncategorized" for any changes that have not yet been categorized. The changelog script has been updated to add this "Uncategorized" header if it isn't already present, and to place any new commits under this header. The changelog has been updated to property categorize each change in recent releases, and to place changes in older releases under the header "Uncategorized". [1]: https://keepachangelog.com/en/1.0.0/ * Remove unused CI script (#10840) This script has not been used since #10795. It is now gone. * Add `--rc` flag to changelog script (#10839) The changelog script now accepts an `--rc` flag to tell it whether to add new changes to `Unreleased` or to the header for the current version. Previously this was inferred from whether the current version matched the most recent tag. However this method only works for the first update. Using a flag simplifies this logic, and makes it possible to manually re-run this for further updates to a release candidate. * Add `--help` flag to changelog script (#10846) The changelog script now accepts a `--help` flag, which prints a help text explaining how the script works and what each flag does. * add abstraction for waitForSelector (#10844) * Adds jest dependency (#10845) * Add Jest * Refactor changelog parsing and generation (#10847) The `auto-changelog.js` script has been refactoring into various different modules. This was done in preparation for migrating this to a separate repository, where it can be used in our libraries as well. Functionally this should act _mostly_ the same way, but there have been some changes. It was difficult to make this a pure refactor because of the strategy used to validate the changelog and ensure each addition remained valid. Instead of being updated in-place, the changelog is now parsed upfront and stored as a "Changelog" instance, which is a new class that was written to allow only valid changes. The new changelog is then stringified and completely overwrites the old one. The parsing had to be much more strict, as any unanticipated content would otherwise be erased unintentionally. This script now also normalizes the formatting of the changelog (though the individual change descriptions are still unformatted). The changelog stringification now accommodates non-linear releases as well. For example, you can now release v1.0.1 *after* v2.0.0, and it will be listed in chronological order while also correctly constructing the `compare` URLs for each release. * Increase default slippage from 2% to 3%, show Advanced Options by default (#10842) * Increase default slippage from 2% to 3%, show Advanced Options by default * Disable opening / closing of Advanced Options on the Swap page * Pre-select previously used slippage value when going back to the Swap page * Fix lint issues * Use a callback for setting up an initial customValue * Migrate unreleased changes in changelog (#10853) When updating the changelog for a release candidate, any unreleased changes are now migrated to the release header. Generally we don't make a habit of adding changes to the changelog prior to creating a release candidate, but if any are there we certainly don't want them duplicated. * @metamask/eslint-config*@6.0.0 (#10858) * @metamask/eslint-config*@6.0.0 * Minor eslintrc reorg * Refactoring threebox.spec.js to use fixtures (#10849) * Adjust renderWithProvider to accommodate redux-less components (#10857) * Jest config (#10855) * Setup jest config * Adjust test for jest. * Adjust lint config * Omit swaps ui folder for unit testing * Omit swaps from test:unit:lax * Add jest.config.js to script files * Restore mocks rather than clearing them. * Update jest config and adjust lint to include subdirs * Convert view-quote-price-difference test to jest * Add jest ci and ci coverage scripts. Add jest unit test to general test command * Add test coverage to ci * Use --ignore flag * Fixup * Add @metamask/eslint-config-jest * Update .eslintrc.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Adds jest-coverage/ Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Add jest-coverage/ to prettierignore (#10865) * Add jest coverage (#10868) * Add jest coverage This will add coverage for any tests ran in jest under the `test:coverage:jest` command, which is currently being used in CI. I set the values to the current test coverage in `ui/app/pages/swaps`. * Lint * Fix crash when adding new changelog release header (#10870) The `auto-changelog.js` script crashes when trying to add a new release header. This bug was introduced in #10847. The cause was a simple misnamed parameter. * Change caching for Swaps APIs from 1 hour to 5 minutes (#10871) * Change caching for the /tokens API from 1 hour to 5 minutes * Use 5 minutes caching for /topAssets and /aggregatorMetadata APIs as well * add key literals to driver (#10854) * Quote globs in prettier scripts (#10867) * use waitForSelector instead of until (#10852) * complete abstraction of until method * response to feedback * Adding recovery phrase video to onboarding process (#10717) * Adding recovery phrase video to onboarding process Adding english subtitles * Support textAlign in Box, converting sidebar to Box * Reduce calls of the `/featureFlag` API (#10859) * Remove periodic calls to the /featureFlag API * Always show the Swap button on the main page * Check if the Swaps feature is enabled, show loading animation while waiting * Reuse an existing useEffect call * Use ‘isFeatureFlagLoaded’ in React’s state, resolve lint issues * Add a watch mode for Jest testing * Add unit tests for Swaps: fetchSwapsLiveness, add /ducks/swaps into Jest testing * Remove Swaps Jest tests from Mocha’s ESLint rules * Ignore Swaps Jest tests while running Mocha, update paths * Increase test coverage to the current max * Fix ESLint issues for Swaps * Enable the Swaps feature by default and after state reset, remove loading screen before seeing Swaps * Update Jest config, fix tests * Update Jest coverage threshold to the current maximum * Update ESLint rule in jest.config.js * Disable the “Review Swap” button if the feature flag hasn’t loaded yet * Update jest threshold * Fix 10036 - Prevent odd localStorage migration error in Firefox (#10884) * Add jest watch mode script (#10869) * Refactoring metamask-responsive-ui.spec.js to use fixtures (#10866) * Handling infura blockage (#10883) * Handling infura blockage * Adding blockage home notification * Updating copy, adding temporary notification dismissal * Addressing review feedback * Using eth_blockNumber method to check Infura availability * Handling network changes in availability check * Use jest to run ui/**/*.test.js (#10885) * upgrade ethereumjs util (#10886) * Swaps: Show a network name dynamically in a tooltip (#10882) * Swaps: Show a network name dynamically in a tooltip * Replace “Ethereum” with “$1”, change “Test” to “Testnet” * Replace 이더리움 with $1 * Translate network names, use ‘Ethereum’ by default if a translation is not available yet * Reorder messages to resolve ESLint issues * Add a snapshot test for the FeeCard component, increase Jest threshold * Enable snapshot testing into external .snap files in ESLint * Add the “networkNameEthereum” key in ko/messages.json, remove default “Ethereum” value * Throw an error if chain ID is not supported by the Swaps feature * Use string literals when calling the `t` fn, * Adding option to set Custom Nonce to Confirm Approve Page (#10595) * Dep Upgrades for Lavamoat Patches (#10902) * dep upgrades * apply more patches * Dep upgrades and patches (#10903) * apply patches * lavamoat dep upgrades * remove lavamoat browserify * Increase Jest unit test coverage for the Swaps feature to ~25% (#10900) * Swaps: Show a network name dynamically in a tooltip * Replace “Ethereum” with “$1”, change “Test” to “Testnet” * Replace 이더리움 with $1 * Translate network names, use ‘Ethereum’ by default if a translation is not available yet * Reorder messages to resolve ESLint issues * Add a snapshot test for the FeeCard component, increase Jest threshold * Enable snapshot testing into external .snap files in ESLint * Add the “networkNameEthereum” key in ko/messages.json, remove default “Ethereum” value * Throw an error if chain ID is not supported by the Swaps feature * Use string literals when calling the `t` fn, * Watch Jest tests silently (no React warnings in terminal, only errors) * Add @testing-library/jest-dom, import it before running Jest tests * Add snapshot testing of Swaps’ React components for happy paths, increase minimum threshold for Jest * Add the test/jest folder for Jest setup and shared functions, use it in Swaps Jest tests * Fix ESLint issues, update linting config * Enable ESLint for .snap files (Jest snapshots), throw an error if a snapshot is bigger than 50 lines * Don’t run lint:fix for .snap files * Move `createProps` outside of `describe` blocks, move store creation inside tests * Use translations instead of keys, update a rendering function to load translations * Make sure all Jest snapshots are shorter than 50 lines (default limit) * Add / update props for Swaps tests * Fix React warnings when running tests for Swaps * Bump @metamask/contract-metadata from 1.23.0 to 1.25.0 (#10899) Bumps [@metamask/contract-metadata](https://github.com/MetaMask/contract-metadata) from 1.23.0 to 1.25.0. - [Release notes](https://github.com/MetaMask/contract-metadata/releases) - [Commits](https://github.com/MetaMask/contract-metadata/compare/v1.23.0...v1.25.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Refactoring from-import-ui.spec.js to use fixtures (#10907) * Fix 10458 - Understand where to get support (#10895) * Add contract address validation for token swaps (#10912) * Fixing ENS input entry in send flow (#10923) * Fixing ENS input entry in send flow Fixes MetaMask/metamask-extension#10691 * removed unnecessary apostrophe * Refactoring incremental-security.spec.js to use fixtures (#10917) * use one segment instance (#10915) * Implement Ledger Live bridge (#10293) * add view account-details menu item to token-options menu (#10932) * add view account-details menu item to token-options menu * add onViewAccountDetails propType * Fix 10609 - Prevent overflow of confirmation page hostname (#10935) * upgrade eth-keyring-controller (#10933) * [Fix] 10365 My Accounts Removal (#10680) * pushing my-accounts removal * removed CONTACT_MY_ACCOUNTS_ROUTE * removed CONTACT_MY_ACCOUNTS_VIEW_ROUTE * removing CONTACT_MY_ACCOUNTS_EDIT_ROUTE * removing CONTACT_MY_ACCOUNTS_EDIT_ROUTE * removed showingMyAccounts dead code * removed more dead code related to isMyAccountsPage * removing more dead code * fixed linting error(s) * removing my-accounts component/folder * added empty contact screen ui * styled empty contact page ui * fixed linting, removed add contacts button, and fixed errors * localized text and centered No Contacts * pushing localized verification and fixed e2e test * added listRoute redirect * added listroute and fixed linting error * Increase Jest unit test coverage for the Swaps feature to ~43% (#10934) * add hamburger menu to eth page (#10938) * add hamburger menu to eth page * change token-options to asset-options, use more direct selector for user address fetch * use token custom icons where possible (#10939) * Whats new popup (#10583) * Add 'What's New' notification popup * Move selectors from shared/notifications into ui/ directory * Use keys for localized message in whats new notifications objects, to ensure notifications will be translated. * Remove unused swaps intro popup locale messages * Fix keys of whats new notification locales * Remove notifications messages and descriptions from comment in shared/notifications * Move notifcationActionFunctions to shared/notifications and make it stateless * Get notification data from constants instead of state in whats-new-popup * Code cleanup * Fix build quote reference to swapsEthToken, broken during rebase * Rename notificationFilters to notificationToExclude to clarify its purpose * Documentation for getSortedNotificationsToShow * Move notification action functions from shared/ to whats-new-popup.js * Stop setting swapsWelcomeMessageHasBeenShown to state in app-state controller * Update e2e tests for whats new popup changes * Updating migration files * Addressing feedback part 1 * Addressing feedback part 2 * Remove unnecessary div in whats-new-popup * Change getNotificationsToExclude to getNotificationsToInclude for use in the getSortedNotificationsToShow selector * Delete intro-popup directory and test files * Lint fix * Add notifiction state to address-entry fixture * Use two separate functions for rendering first and subsequent notifications in the whats-new-popup * Ensure that string literals are passed to t for whats new popup text * Update import-ui fixtures to include notificaiton controller state * Remove unnecessary, accidental change confirm-approve * Remove swaps notification in favour of mobile swaps as first notifcation and TBD 3rd notification * Update whats-new-popup to use intersection observer api to detect if notification has been seen * Add notifications to send-edit and threebox e2e test fixtures * Update ui/app/selectors/selectors.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Update ui/app/selectors/selectors.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Clean up locale code for whats-new-popup notifications * Disconnect observers in whats-new-popup when their callback is first called * Add test case for migration 58 for when the AppStateController does not exist * Rename popover components containerRef to popoverWrapRef * Fix messages.json * Update notification messages and images * Rename popoverWrapRef -> popoverRef in whats-new-popup and popover.component * Only create one observer, and only after images have loaded, in whats-new-popup * Set width and height on whats-new-popup image, instead of setting state on img load * Update ui/app/components/app/whats-new-popup/whats-new-popup.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Code clean up in whats new popup re: notification rendering and action functions * Code cleanup in render notification functions of whats-new-popup * Update ui/app/components/app/whats-new-popup/whats-new-popup.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * lint fix * Update and localize notification dates * Clean up date code in shred/notifications/index.js Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Revert "Implement Ledger Live bridge (#10293)" This reverts commit 15b596ad15f2d569255c39e5e7babc8b7ab700ca. * Version v9.5.0 * Update changelog for v9.5.0 * yarn allow-scripts and yarn lavamoat:auto for Version-v9.5.0 branch * Anchor the Need Help text to the bottom of the expanded page (#10955) * fix transaction sync logic (#10954) * Add backwards compatibility for ETH <-> WETH contract address validation (#10962) * Whats new popup design fixes (#10964) * Remove padding on QR code image * Allow the qr code to be below the description in the whats new popup * Fix size and position of QR code in whats new notification * Add right caret to action links in whats new popup * Clean up placeImageBelowDescription logic * Fix display of whats-new-popup image * Improve spacing and sizing of whats new popup in both full screen and popup view * refactor * Ensure method of adding contact when contacts exist (#10963) * Fixing alignment issue with bottom notification (#10979) * Revert "Adding recovery phrase video to onboarding process (#10717)" This reverts commit 9e918b602655e0e4620ab19a3959a8fc08ec0f47. * Removing recovery video entry from changelog * Remove tests that are only needed for the commit reverted in 68c5defc * Fix dependency vulnerability by upgrading xmlhttprequest-ssl via yarn.lock (#10990) Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Barry Gitarts <bgitarts@gmail.com> Co-authored-by: Dan J Miller <danjm.com@gmail.com> Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com> Co-authored-by: Brad Decker <git@braddecker.dev> Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: David Walsh <davidwalsh83@gmail.com> Co-authored-by: Niranjana Binoy <43930900+NiranjanaBinoy@users.noreply.github.com> Co-authored-by: Shane <jonas.shane@gmail.com> Co-authored-by: gitpurva <47534619+gitpurva@users.noreply.github.com> Co-authored-by: kumavis <kumavis@users.noreply.github.com> Co-authored-by: Etienne Dusseault <etienne.dusseault@gmail.com> Co-authored-by: kumavis <aaron@kumavis.me> Co-authored-by: Grant Bakker <grant@bakker.pw> Co-authored-by: Michael Standen <screaminghawk@gmail.com> Co-authored-by: Muhammet Kara <mrkara@users.noreply.github.com> Co-authored-by: Daniel <80175477+dan437@users.noreply.github.com> Co-authored-by: Thomas Huang <tmashuang@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Thomas <thomas.b.huang@gmail.com> Co-authored-by: Alex Donesky <alex.donesky@consensys.net> Co-authored-by: Austin Akers <austin.akers5@gmail.com> Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
2021-05-05 20:08:59 +02:00
"test": "yarn lint && yarn test:unit && yarn test:unit:jest",
"dapp": "node development/static-server.js node_modules/@metamask/test-dapp/dist --port 8080",
"dapp-chain": "GANACHE_ARGS='-b 2' concurrently -k -n ganache,dapp -p '[{time}][{name}]' 'yarn ganache:start' 'sleep 5 && yarn dapp'",
Add support for one-click onboarding (#7017) * Add support for one-click onboarding MetaMask now allows sites to register as onboarding the user, so that the user is redirected back to the initiating site after onboarding. This is accomplished through the use of the `metamask-onboarding` library and the MetaMask forwarder. At the end of onboarding, a 'snackbar'-stype component will explain to the user they are about to be moved back to the originating dapp, and it will show the origin of that dapp. This is intended to help prevent phishing attempts, as it highlights that a redirect is taking place to an untrusted third party. If the onboarding initiator tab is closed when onboarding is finished, the user is redirected to the onboarding originator as a fallback. Closes #6161 * Add onboarding button to contract test dapp The `contract-test` dapp (run with `yarn dapp`, used in e2e tests) now uses a `Connect` button instead of connecting automatically. This button also serves as an onboarding button when a MetaMask installation is not detected. * Add new static server for test dapp The `static-server` library we were using for the `contract-test` dapp didn't allow referencing files outside the server root. This should have been possible to work around using symlinks, but there was a bug that resulted in symlinks crashing the server. Instead it has been replaced with a simple static file server that will serve paths starting with `node_modules` from the project root. This will be useful in testing the onboarding library without vendoring it. * Add `@metamask/onboarding` and `@metamask/forwarder` Both libraries used to test onboarding are now included as dev dependencies, to help with testing. A few convenience scripts were added to help with this (`yarn forwarder` and `yarn dapp-forwarder`)
2019-11-22 18:03:51 +01:00
"forwarder": "node ./development/static-server.js ./node_modules/@metamask/forwarder/dist/ --port 9010",
"dapp-forwarder": "concurrently -k -n forwarder,dapp -p '[{time}][{name}]' 'yarn forwarder' 'yarn dapp'",
"test:unit": "node ./test/run-unit-tests.js --mocha --jestGlobal --jestDev",
"test:unit:jest": "node ./test/run-unit-tests.js --jestGlobal --jestDev",
"test:unit:global": "mocha test/unit-global/*.test.js",
"test:unit:mocha": "node ./test/run-unit-tests.js --mocha",
"test:e2e:chrome": "SELENIUM_BROWSER=chrome node test/e2e/run-all.js",
"test:e2e:chrome:snaps": "SELENIUM_BROWSER=chrome node test/e2e/run-all.js --snaps",
"test:e2e:chrome:mv3": "SELENIUM_BROWSER=chrome node test/e2e/run-all.js --mv3",
"test:e2e:chrome:rpc": "SELENIUM_BROWSER=chrome node test/e2e/run-all.js --rpc",
"test:e2e:firefox": "SELENIUM_BROWSER=firefox node test/e2e/run-all.js",
"test:e2e:firefox:snaps": "SELENIUM_BROWSER=firefox node test/e2e/run-all.js --snaps",
"test:e2e:single": "node test/e2e/run-e2e-test.js",
"test:e2e:report": "node ./test/e2e/e2e-process-report.js && jrm ./test/test-results/e2e.xml \"./test/test-results/e2e/*.xml\"",
"test:coverage:mocha": "node ./test/run-unit-tests.js --mocha --coverage",
"test:coverage:jest": "node ./test/run-unit-tests.js --jestGlobal --coverage",
"test:coverage:jest:dev": "node ./test/run-unit-tests.js --jestDev --coverage",
"test:coverage:validate": "node ./test/merge-coverage.js",
"test:coverage": "node ./test/run-unit-tests.js --mocha --jestGlobal --jestDev --coverage && yarn test:coverage:validate",
"test:coverage:html": "yarn test:coverage --html",
"ganache:start": "./development/run-ganache.sh",
"sentry:publish": "node ./development/sentry-publish.js",
"lint": "yarn lint:prettier && yarn lint:eslint && yarn lint:tsc && yarn lint:styles",
"lint:fix": "yarn lint:prettier:fix && yarn lint:eslint:fix && yarn lint:styles:fix",
[FLASK] Add Snaps Keyring (#19710) * flask - add restricted snap_manageAccounts * snap keyring: use local snap keyring instead of package * mvp snap-keyring * fixed the easier lint errors * fix missing permission text * add removal function * update snap keyring * update dep * update git link * update messages and remove snap keyring from lib * set snapprovider as soon as possible * chore: update snap keyring dependency * chore: pass SnapController to SnapKeyring constructor * chore: update deps and comment line (wip) * fix latest update for snaps and remove setController * update yarn lock * add routes * add messages * add message * add snap account detail page * add snap account card * add snap account page * update route * add background * use css grid * update snap text styling * fix lint * remove unused import * change manage link to go to snap * add types for react-router-dom * add link to settings * add breadcrumb to header * add popover * add prop types * add link to propTypes * fix icon in header and tag * update popover * update yarn.lock * add link to account list menu * update from deprecated * add add-snap-popup * use popoverheader * fix lint * update to use modal instead of popup * add install snap * remove export of DeferredPromise * change snap keyring to its own enum * update imports and fences * fix snapId and route * fix header and button for snapCard * hide app header on AddSnapAccountPage * update icon * match path to SnapAccountDetail * set getting started button to close modal * fix key prop warning * add By Metamask message * fix label * add fence to snapkeyringtype * update yarn.lock * refactor removeAccount and static snap list * update removeSnap * feat: remove associated accounts when snap is removed * add get snaps installed to snaps page * fix updateAvailable * add tests to ui components * update test * update scss * udpate config snap popup style * fixed https://www.notion.so/Show-pop-up-only-once-c6aa8494486a4ece8a5c5e35fea56ab5 * update accountListMenu click to open tab or push depending on environment * update yark.lock * remove unused uuid * update lock * update eth-snap-keyring * udpate install from snap page * update to install to use popup * use release versino of eth-snap-keyring * chore: bump snaps-utils version to `0.34.1-flask.1` * update configure snap * chore: update eth-snap-keyring * chore: update policies * fix: remove unused * fix: fix snap-account-detail-page test * fix: fix styles * chore: remove swappable-obj-proxy * fix: fix duplicate entry * fix: disable export private key for snaps account * feat: shuffle snap lists on every reload * fix: configure not popping up * refactor: snapsAddSnapAccountModalDismissal into action and selector * fix: E2BIG when running prettier * fix: lint default export or add-snap-account-modal * fix: lint, remove vendor prefix * fix: fix snapCreatedByMetamask to snapCreatedByMetaMask * Add `manageAccounts` RPC method (#19724) * Update dependencies * Remove snap-keyring-permissions * Update dependencies * Update dependencies * Update imports * removed portfolio link from wallet view (#19716) * removed portfolio link from wallet view * removed unused code * updated test * updated spec file * updated test * Validate LavaMoat policies on each PR (#19703) * Validate LavaMoat policies on each PR The LavaMoat policies are now validated on every PR. This makes it easier to validate policy changes, as they should always correspond with the changes made in the PR (unlike today, when they could be due to a change in platform or a previous PR). Closes #19680 * Update LavaMoat policies --------- Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com> * fix(action): add required permissions to remove labels (#19728) * Fix dependencies * signature approved metrics e2e test (#19628) * Update dependencies * Integrate Snow with LavaMoat scuttling protection (#17969) * Update lavamoat policies * Security Provider cleanup (#19694) * security-prov: isFlaggedSecurityProviderResponse * security-prov: create shared/modules/util * security prov: rn isFlagged -> isSuspcious - util fn returns true if response is not verified and flagged * security prov: add util test and support undefined param * security prov: reorg util fn - no logic changes * Update LavaMoat policies (#19744) Update LavaMoat policies to match what CI expects. * Replacing deprecated constants & creating stories (#19686) * Replacing deprecated constants & creating stories * updating snapshot * fix: fix imports * chore: update policy.json * fix: move SmartTransactionController out of snaps code fence * fix: yarn.lock dedupe * fix: lavamoat policy * fix: update test * fix: remove snapshot, the list of snaps are always randomized. * fix: resole snaps-controller to use flask --------- Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net> Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com> Co-authored-by: Gauthier Petetin <gauthierpetetin@hotmail.com> Co-authored-by: Brad Decker <bhdecker84@gmail.com> Co-authored-by: weizman <weizmangal@gmail.com> Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com> Co-authored-by: Dhruv <79097544+dhruvv173@users.noreply.github.com> Co-authored-by: Monte Lai <monte.lai@consensys.net> * Update LavaMoat policies * chore: fix webapp policy.json * feat: add snap label test * feat: test to disable export private key for snap accounts * feat: add snap account link test in account-list-menu * fix: add fence for setSnapsAddSnapAccountModalDismissed * fix: remove comments * fix: move routes into snaps fence * feat: use snap registry * fix: account snap identification * chore: add `keyring-snaps` feature flag * fix: remove unneeded spread * Disable warn logs in content-script (#19754) * Use Yarn caching in GitHub Actions (#19662) GitHub actions that install dependencies will now also cache those dependencies using the standard strategy for Yarn (which is to hash the lockfile). This matches the module template (see https://github.com/MetaMask/metamask-module-template/pull/145 for details). This should have no functional impact except that this action will run faster when dependencies are unchanged. * Fixing misspelling in 10.28.0 changelog notes (#19756) * Add `tokenId` type validation in `wallet_watchAsset` middleware (#19738) * Remove unused GitHub Action workflow (#19660) This GitHub action workflow was disabled, but was still running setup steps. It has now been removed entirely. We can re-introduce it again later once the problem that led to it being disabled has been fixed. The associated npm script and JavaScript module have been removed as well. * Fix #847 - Don't show account address on token pages (#19740) Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net> * Deprecating FormField and fixing console error (#19739) * Deprecating FormField and fixing console error * Updating snapshots * updated linea image for token and badge (#19717) * updated linea image for token and badge * replaced hardcoded string with constant * UI updates for contacts Page (#19646) * updated contacts flow update * json file updates * updated contacts edit and view list * keep contacts tab selected * lint fix * replaced hardcoded strings with constant * updated padding in box * Replacing deprecated components and fixing prop errors (#19745) * Use `snaps@0.35.2-flask.1` and `snaps@1.0.0-prerelease.1` (#19734) * snaps@0.35.0-flask.1 * Update LavaMoat policies * Update stable snaps packages to 1.0.0-prerelease.1 * Update LavaMoat policies * Fix lint * snaps@0.35.2 * Exclude snap_manageAccounts * Code fencing * Revert removing endowment:keyring exclusion * Bump iframe URLs * UX: Ensure multichain native token name is always shown (#19705) * UX: Ensure multichain native token name is always shown * Fix lint * UX Multichain: fixed padding for edit screen (#19707) * fixed padding for edit screen * Use network picker for header trigger * Fix swaps display * updated snapshot --------- Co-authored-by: David Walsh <davidwalsh83@gmail.com> * Bump @metamask/providers to v11.1.0 (#19762) * Bump @metamask/providers to v11.1.0 --------- Co-authored-by: Alex <adonesky@gmail.com> * Fix fallback gas estimation (#19746) * Fix fallback gas estimation Our fallback gas estimation was failing due to a bug in the `@metamask/controller-utils` package. This was causing gas estimation to fail completely on certain networks (those not supported by our gas estimation APIs and non EIP-1559 compatibile), and it was causing the fallback gas estimation operation (in case our API was down) to fail across all networks. Fixes https://github.com/MetaMask/metamask-extension/issues/19735 * Add e2e tests E2E tests have been added to capture gas estimation. Cases are added for our API, for the fallback estimate, and for non-EIP-1559 estimates. As part of this work, the legacy gas API had to be disabled. This was being used in e2e tests but was dead code in production. It needed to be disabled to ensure the code under test was reachable. * Fix gas API referenced in e2e test * Update unit test snapshots * Update Label component font weight from bold to medium (#19731) * Update Label component font weight from bold to medium * update snapshot * fix snapshots * fix snapshots 2 * Removeing deprecated constants for enums --------- Co-authored-by: georgewrmarshall <george.marshall@consensys.net> * Part of #17670: Replace Typography with Text component in CancelSpeedupPopover (#18638) * create story * replace Typography with Text component * review changes * replace CSS with props styling * use `Button` from `component-library` * tooltip HTML refactor with `component-library` components * remove whitespace in story * strong tag support within Text component * addresses #18651 * taken from #18752 as suggested in https://github.com/MetaMask/metamask-extension/pull/18638#discussion_r1176334805 * replace `strong` with new `Text as="strong"` * remove unneccessary css from fa564e3f036f1439f9f220cca23595b508760614 * add text variant definition * Updating text variant of button * restrore proper spacing between elements * Quick fix for test * Adding key --------- Co-authored-by: georgewrmarshall <george.marshall@consensys.net> Co-authored-by: Garrett Bear <gwhisten@gmail.com> * Issue 17670 replace typography with text (#19433) * Replace Typograph with Text component in numeric-input-component.js * Replace Typography with Text component in signature-request-message.js * Replace Typography with Text component in signature-request.component.js * Replacing deprecating constants and fixing some signature story warnings * Updating snapshot * Fixing import --------- Co-authored-by: georgewrmarshall <george.marshall@consensys.net> Co-authored-by: Garrett Bear <gwhisten@gmail.com> * Part of #18714: Replacing deprecated constants in `confirm-subtitle` folder (#19699) * repalcing deprecated constants * resolve issue * lint fixes --------- Co-authored-by: georgewrmarshall <george.marshall@consensys.net> * Part of #17670: Replace Typography with Text component in: callout.js (#18912) * Part of #17670: Replace Typography with Text component in: callout.js * Update ui/components/ui/callout/callout.js Co-authored-by: Danica Shen <zhaodanica@gmail.com> * Update callout.js * Updating snapshot and deprecating component * Updating snapshot and deprecating component --------- Co-authored-by: Danica Shen <zhaodanica@gmail.com> Co-authored-by: George Marshall <george.marshall@consensys.net> Co-authored-by: Garrett Bear <gwhisten@gmail.com> * [MMI] Added code fences in whats new popup (#19581) * added code fences in whats new popup * Improved code * Added missing prop * Update LavaMoat policies * updated functions by using an options object for the rendering functions in order to bypass possible typsecript issues --------- Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com> * Updated action list in token, NFTs and activity view (#19702) * updated ui for nft import button * updated no nft image found in the center * updated footer for all screens in tabs * removed no nft state from nft tab * updated snapshot * lint fix * fixed e2e tests * fixed prep build error * removed no nfts yet test * updated tabs * fixed prod error * updated no nft screen * changed button size to md * fix: change 'M' to '?' * fix: update fence to keyring-snaps * chore: rename folder * fix: typo * chore: remove logs * feat: add metamask developer constant * fix: sass keyring-snap path * chore: update yarn.lock * fix: remove alias * feat: add KEYRING_SNAPS_REGISTRY_URL env * fix: nested fence * feat: add snap manageAccount e2e (#19777) * feat: add snap manageAccount e2e * feat: update link * fix: lint * fix: get values of restrictedMethodPermissionBuilders * fix: add fence to perferences * fix: stop shuffle * fix: remove KEYRING_SNAPS_REGISTRY_URL from metamaskRc * fix: use permissions to determine account snaps * fix: remove shuffle * fix: add comments to fences in excluded snap permission. * chore: fix policy.json * fix: fix snap-account-detail test * fix: lint * fix: snap accoutn detail page test * Update LavaMoat policies * Update ui/pages/keyring-snaps/snap-account-detail-page/snap-account-detail-page.test.tsx Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> * Update ui/pages/keyring-snaps/snap-account-detail-page/snap-account-detail-page.test.tsx Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> * fix: remove fence from isAbleToExportAccount * chore: remove comment line * fix: dismiss snap modal * fix: try catch for scroll * fix: icon for manageAccount * fix: update `handleSnapRequest` to make `params` optional and add `id` * fix: lint for uuid * fix: remove arg in saveSnapKeyring * fix: add fence for uuidV4 * chore: bump dep * fix: permission_manageAccounts message and icon * chore: update registry link * chore: convert address to lowercase * fix: change icon * chore: bump eth-snap-keyring * chore: update webapp policy.json * Update ui/pages/keyring-snaps/new-snap-account-page/new-snap-account-page.test.tsx Co-authored-by: Gustavo Antunes <17601467+gantunesr@users.noreply.github.com> * fix: update fences * fix: nested fence * Update app/_locales/en/messages.json Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> * Update app/_locales/en/messages.json Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> * Update app/_locales/en/messages.json Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> * Update app/_locales/en/messages.json Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> * Update ui/components/multichain/account-details/account-details-display.js Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> * Update ui/pages/keyring-snaps/snap-account-detail-page/header.tsx Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> * Update ui/pages/keyring-snaps/snap-account-detail-page/snap-account-detail-page.tsx Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> * fix: rename and added jsdoc * fix: add fence to snap label * fix: remove comment * fix: change pixel to int and remove unused class * fix: lint * fix: create two tests for main and flask restricted methods * fix: remove fence in test * fix: lint header * feat: allow `metamask.github.io` in manifest * fix: remove comment * fix: rename isAbleToExportAccount * chore: use a more restrictive registry URL * fix: change to && not || * fix: remove unused * fix: move keyring snaps URL to Flask's base manifest * fix: use fetch instead of fetchWithCache * fix: lint --------- Co-authored-by: kumavis <aaron@kumavis.me> Co-authored-by: Howard Braham <howrad@gmail.com> Co-authored-by: Daniel Rocha <68558152+danroc@users.noreply.github.com> Co-authored-by: Gustavo Antunes <17601467+gantunesr@users.noreply.github.com> Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net> Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com> Co-authored-by: Gauthier Petetin <gauthierpetetin@hotmail.com> Co-authored-by: Brad Decker <bhdecker84@gmail.com> Co-authored-by: weizman <weizmangal@gmail.com> Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com> Co-authored-by: Dhruv <79097544+dhruvv173@users.noreply.github.com> Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: Alex Donesky <adonesky@gmail.com> Co-authored-by: David Walsh <davidwalsh83@gmail.com> Co-authored-by: George Marshall <george.marshall@consensys.net> Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com> Co-authored-by: jiexi <jiexiluan@gmail.com> Co-authored-by: jainex <jainexp017@gmail.com> Co-authored-by: Matthias Kretschmann <m@kretschmann.io> Co-authored-by: Garrett Bear <gwhisten@gmail.com> Co-authored-by: Ujwal Kumar <ujwalkumar95@gmail.com> Co-authored-by: rohit kerkar <129620973+rohiiittttt@users.noreply.github.com> Co-authored-by: Harsh Shukla <125105825+PrgrmrHarshShukla@users.noreply.github.com> Co-authored-by: Danica Shen <zhaodanica@gmail.com> Co-authored-by: Albert Olivé <albertolivecorbella@gmail.com> Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>
2023-06-29 15:24:08 +02:00
"lint:prettier": "prettier --check -- '**/*.json'",
"lint:prettier:fix": "prettier --write -- '**/*.json'",
"lint:changed": "./development/get-changed-file-names.sh | grep --regexp='[.]js$' | tr '\\n' '\\0' | xargs -0 eslint",
"lint:changed:fix": "./development/get-changed-file-names.sh | grep --regexp='[.]js$' | tr '\\n' '\\0' | xargs -0 eslint --fix",
"lint:changelog": "auto-changelog validate",
"lint:changelog:rc": "auto-changelog validate --rc",
"lint:eslint": "eslint . --ext js,ts,tsx,snap --cache",
"lint:eslint:fix": "yarn lint:eslint --fix",
"lint:lockfile:dedupe": "yarn dedupe --check",
"lint:lockfile:dedupe:fix": "yarn dedupe",
"lint:lockfile": "lockfile-lint --path yarn.lock --allowed-hosts npm yarn github.com codeload.github.com --empty-hostname true --allowed-schemes \"https:\" \"git+https:\" \"npm:\" \"patch:\" \"workspace:\"",
"lint:shellcheck": "./development/shellcheck.sh",
"lint:styles": "stylelint '*/**/*.scss'",
"lint:styles:fix": "yarn lint:styles --fix",
"lint:tsc": "tsc --project tsconfig.json --noEmit",
"validate-source-maps": "node ./development/sourcemap-validator.js",
"verify-locales": "node ./development/verify-locale-strings.js",
2019-11-29 19:39:45 +01:00
"verify-locales:fix": "node ./development/verify-locale-strings.js --fix",
2018-09-26 02:44:57 +02:00
"mozilla-lint": "addons-linter dist/firefox",
"devtools:react": "react-devtools",
"devtools:redux": "remotedev --hostname=localhost --port=8000",
Switch from `npm` to `yarn` (#6843) As a solution to the constant lockfile churn issues we've had with `npm`, the project now uses `yarn` to manage dependencies. The `package-lock.json` file has been replaced with `yarn.lock`, which was created using `yarn import`. It should approximate the contents of `package-lock.json` fairly well, though there may be some changes due to deduplication. The codeowners file has been updated to reference this new lockfile. All documentation and npm scripts have been updated to reference `yarn` rather than `npm`. Note that running scripts using `npm run` still works fine, but it seemed better to switch those to `yarn` as well to avoid confusion. The `npm-audit` Bash script has been replaced with `yarn-audit`. The output of `yarn audit` is a bit different than `npm audit` in that it returns a bitmask to describe which severity issues were found. This made it simpler to check the results directly from the Bash script, so the associated `npm-audit-check.js` script was no longer required. The output should be exactly the same, and the information is still sourced from the same place (the npm registry). The new `yarn-audit` script does have an external dependency: `jq`. However, `jq` is already assumed to be present by another CI script, and is present on all CI images we use. `jq` was not added to `package.json` as a dependency because there is no official package on the npm registry, just wrapper scripts. We don't need it anywhere exept on CI anyway. The section in `CONTRIBUTING` about how to develop inside the `node_modules` folder was removed, as the advice was a bit dated, and wasn't specific to this project anyway.
2019-07-30 20:36:23 +02:00
"start:dev": "concurrently -k -n build,react,redux yarn:start yarn:devtools:react yarn:devtools:redux",
"announce": "node development/announcer.js",
"storybook": "storybook dev -p 6006 -c .storybook",
"storybook:build": "storybook build -c .storybook -o storybook-build",
"storybook:deploy": "storybook-to-ghpages --existing-output-dir storybook-build --remote storybook --branch master",
"update-changelog": "auto-changelog update",
"generate:migration": "./development/generate-migration.sh",
"lavamoat:build": "lavamoat development/build/index.js --policy lavamoat/build-system/policy.json --policyOverride lavamoat/build-system/policy-override.json",
"lavamoat:build:auto": "yarn lavamoat:build --writeAutoPolicy",
"lavamoat:debug:build": "yarn lavamoat:build --writeAutoPolicyDebug --policydebug lavamoat/build-system/policy-debug.json",
"lavamoat:webapp:auto": "node ./development/generate-lavamoat-policies.js --devMode=true",
"lavamoat:webapp:auto:ci": "node ./development/generate-lavamoat-policies.js --parallel=false",
"lavamoat:auto": "yarn lavamoat:build:auto && yarn lavamoat:webapp:auto",
"ts-migration:dashboard:build": "ts-node development/ts-migration-dashboard/scripts/build-app.ts",
"ts-migration:dashboard:deploy": "gh-pages --dist development/ts-migration-dashboard/build/final --remote ts-migration-dashboard",
"ts-migration:dashboard:watch": "yarn ts-migration:dashboard:build --watch",
Add TypeScript migration dashboard (#13820) As we convert parts of the codebase to TypeScript, we will want a way to track progress. This commit adds a dashboard which displays all of the files that we wish to convert to TypeScript and which files we've already converted. The list of all possible files to convert is predetermined by walking the dependency graph of each entrypoint the build system uses to compile the extension (the files that the entrypoint imports, the files that the imports import, etc). The list should not need to be regenerated, but you can do it by running: yarn ts-migration:enumerate The dashboard is implemented as a separate React app. The CircleCI configuration has been updated so that when a new commit is pushed, the React app is built and stored in the CircleCI artifacts. When a PR is merged, the built files will be pushed to a separate repo whose sole purpose is to serve the dashboard via GitHub Pages (this is the same way that the Storybook works). All of the app code and script to build the app are self-contained under `development/ts-migration-dashboard`. To build this app yourself, you can run: yarn ts-migration:dashboard:build or if you want to build automatically as you change files, run: yarn ts-migration:dashboard:watch Then open the following file in your browser (there is no server component): development/ts-migration-dashboard/build/index.html Finally, although you shouldn't have to do this, to manually deploy the dashboard once built, you can run: git remote add ts-migration-dashboard git@github.com:MetaMask/metamask-extension-ts-migration-dashboard.git yarn ts-migration:dashboard:deploy
2022-08-09 22:16:08 +02:00
"ts-migration:enumerate": "ts-node development/ts-migration-dashboard/scripts/write-list-of-files-to-convert.ts",
"test-storybook": "test-storybook -c .storybook",
"test-storybook:ci": "concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"yarn storybook:build && npx http-server storybook-build --port 6006 \" \"wait-on tcp:6006 && echo 'Build done. Running storybook tests...' && yarn test-storybook --maxWorkers=2\"",
"githooks:install": "husky install",
"fitness-functions": "ts-node development/fitness-functions/index.ts",
"generate-beta-commit": "node ./development/generate-beta-commit.js",
"validate-branch-name": "validate-branch-name",
"add-release-label-to-pr-and-linked-issues": "ts-node ./.github/scripts/add-release-label-to-pr-and-linked-issues.ts",
2023-08-02 00:19:19 +02:00
"check-pr-has-required-labels": "ts-node ./.github/scripts/check-pr-has-required-labels.ts",
"close-release-bug-report-issue": "ts-node ./.github/scripts/close-release-bug-report-issue.ts",
2023-08-02 00:19:19 +02:00
"audit": "yarn npm audit --recursive --environment production --severity moderate"
},
3box integration 2.0 (#6972) * Adds threebox controller * Adds threebox approval modal * Fix unit tests and lint after addition of threebox * Correct threebox behaviour after rejecting request for backup; fixes e2e tests. * Update threebox controller for automatic syncing * Ensure frontend locale updates when preferences are changed via direct update within controller * Add toggle in settings for 3box syncing * Update threebox controller for latest 3box version * Delete unnecessary frontend changes for threebox integration * Backing up address book contacts with threebox * Update unit tests for 3box-integration additions * Only enable threebox by default for new wallets * Mock globals for correct unit tests * 3box '1.10.2' -> '^1.10.2' * Correct capilalization on 3Box * Use log.debug instead of console.log in threebox controller * Update yarn.lock * Remove edge build * Split 3box module into background deps js file * extra bundle opts for bg-libs * sync yarn.lock * new3Box logic * Show confirm threebox restore after import * Remove bg-libs.js from manifest file for dev builds * Switch 3Box controller to using the spaces api (instead of the profile api) * Finalize switching to spaces api and only restoring from 3box after import * Update metamask-controller-test.js for threebox controller changes * Make threebox modal style consistent with others and update success button wording * Use mock 3box when in test * Correct 3box modal header * Remove unnecessary property of threebox controller provider * Remove unnecessary method calls after restoration from 3box in the threebox-restore-confirm modal. * Replace setThreeBoxSyncingPermission calls in routes/index.js with turnThreeBoxSyncingOn * Replace erroneous use of with * Replace erroneous use of threeboxSyncing with threeBoxSyncingAllowed in advancted-tab directory * Lint fixes for 3box changes * Log errors encountered when updating 3Box * Remove unnecessary parameter from state update * Add timeout to initial 3Box sync The initial 3Box sync will now timeout after 1 minute. If the timeout is triggered, 3Box is disabled and cannot be re-enabled unless the initial sync does finally finish. If it never finishes, 3Box cannot be enabled unless the extension is reinstalled. The Advanced Settings page was updated to show this option as disabled in that circumstance, with a new discription explaining why it's disabled. The UI here could certainly be improved. Additionally, "on" and "off" labels were added to the toggle to match the other toggles on the Advanced Settings page. * Use non-minified 3Box module We had previously used the minified 3Box module to avoid a build error encountered when `envify` was processing the `libp2p` module (which is used by 3Box). The build would fail because `esprima` (used by `envify`) is incompatible with the object spread/rest operator (which is used in `libp2p`). That issue has been solved by adding a global Babelify transformation specifically for transpiling out the object rest/spread operator from dependencies. It has been targetted to only affect `libp2p` to avoid extending the build time too much. This workaround can be used until a new version of `esprima` is released that includes this bug fix. * Use app key addresses for threebox * Replace use of modal for confirming 3box restoration with a home notification * Adds e2e tests for restoring from threebox * Update eth-keyring-controller to 5.1.0 * Correct parameters passed to getAppKeyAddress in threebox.js * Add prefix to origin passed to getAppKeyAddress in threebox.js * Remove unused locale message. * Prevent CORS errors in firefox e2e tests * Ensure extraneous scripts are excluded from the local test dev build * Move threeBoxLastUpdate state from home.component to redux * Threebox PR code cleanup * Always use first address when initializing threebox * Replace setRestoredFromThreeBox api with setRestoredFromThreeBoxToFalse and setRestoredFromThreeBoxToTrue * Update development/metamaskbot-build-announce.js to include ui-libs and bg-libs in hard coded bundle list * Update test/e2e/threebox.spec.js to use new helpers added with pull #7144 * Make setFeatureFlag available on the ui window during testing * Hide threebox feature behind a feature flag that can only be activated via dev console * Remove unnecessary migration of threebox feature flag * Prevent this.init() call in threebox constructor if feature flag is not turned on * Prevent threebox notification from showing if feature flag is falsy * http://localhost/8889 -> http://localhost/* in gulp manifest:testing tasks
2019-09-16 19:11:01 +02:00
"resolutions": {
"simple-update-notifier@^1.0.0": "^2.0.0",
"@babel/core": "patch:@babel/core@npm%3A7.21.5#./.yarn/patches/@babel-core-npm-7.21.5-c72c337956.patch",
"@babel/runtime": "patch:@babel/runtime@npm%3A7.18.9#./.yarn/patches/@babel-runtime-npm-7.18.9-28ca6b5f61.patch",
"@metamask/approval-controller": "^3.4.0",
"@types/react": "^16.9.53",
"analytics-node/axios": "^0.21.2",
"bn.js": "^5.2.1",
"ganache-core/lodash": "^4.17.21",
"git-url-parse@^12.0.0": "^13.1.0",
"glob-parent": "^6.0.2",
"globalthis@^1.0.1": "1.0.1",
Version v9.3.0 RC (#10739) * Replace logic for eth swap token in fetchQuotesAndSetQuoteState with getSwapsEthToken call (#10624) * Move swaps constants to the shared constants directory (#10614) * Fix: ETH 'token' now only appears once in the swaps to and from dropdowns. (#10650) * Swaps support for local testnet (#10658) * Swaps support for local testnet * Create util method for comparison of token addresses/symbols to default swaps token * Get chainId from txMeta in _trackSwapsMetrics of transaction controller * Add comment to document purpose of getTransactionGroupRecipientAddressFilter * Use isSwapsDefaultTokenSymbol in place of repeated defaultTokenSymbol comparisons in build-quote.js * Additional swaps network support (#10721) * Add swaps support for bnc chain * Use single default token address in shared/constants/swaps * Ensure swaps gas prices are fetched from the correct chain specific endpoint (#10744) * Ensure swaps gas prices are fetched from the correct chain specific endpoint * Just rely on fetchWithCache to cache swaps gas prices, instead of directly using storage in getSwapsPriceEstimatesLastRetrieved * Empty commit * update @metamask/etherscan-link to v2.0.0 (#10747) * Use correct block explorer name and link in swaps when on custom network (#10743) * Use correct block explorer name and link in swaps when on custom network. * Fix up custom etherscan link code in build-quote.js * Use blockExplorerUrl hostname instead of 'blockExplorerBaseUrl' * Use correct etherscan-link method for token links in build-quote * Create correct token link in build-quote for mainnet AND custom networks * Block explorer url improvements in awaiting-swap.js and build-quote.js * Use swapVerifyTokenExplanation message with substitutable block explorer for all applicable locales * Ensure that block explorer links are not shown in awaiting-swap if no url is available * Ensure that the correct default currency symbols are used for fees on the view quote screen (#10753) * Updating y18n and netmask to resolve dependency issues (#10765) netmask@1.0.6 -> 2.0.1, y18n@3.2.1 -> 3.2.2, y18n@4.0.0 -> 4.0.1 * Ensure that priceSlippage fiat amounts are always shown in view-quote.js (#10762) * Ensure that the approval fee in the swaps custom gas modal is in network specific currency (#10763) * Use network specific swaps contract address when checking swap contract token approval (#10774) * Set the BSC_CONTRACT_ADDRESS to lowercase (#10800) * Ensure correct primary currency image is displayed on home screen and token list (#10777) * [skip e2e] Update changelog for v9.3.0 (#10740) * Version v9.3.0 * [skip e2e] Update changelog for v9.3.0 (#10803) Co-authored-by: Dan J Miller <danjm.com@gmail.com> Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: David Walsh <davidwalsh83@gmail.com> Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
2021-04-02 21:30:57 +02:00
"netmask": "^2.0.1",
2022-01-31 15:46:25 +01:00
"json-schema": "^0.4.0",
"ast-types": "^0.14.2",
"x-default-browser": "^0.5.2",
2023-02-17 06:45:09 +01:00
"web3-provider-engine/eth-json-rpc-filters": "^6.0.0",
"typescript@~4.4.0": "patch:typescript@npm:4.4.4#.yarn/patches/typescript-npm-4.4.4-3fedcc07a3.patch",
"acorn@^7.0.0": "patch:acorn@npm:7.4.1#.yarn/patches/acorn-npm-7.4.1-f450b4646c.patch",
"acorn@^7.4.1": "patch:acorn@npm:7.4.1#.yarn/patches/acorn-npm-7.4.1-f450b4646c.patch",
"acorn@^7.1.1": "patch:acorn@npm:7.4.1#.yarn/patches/acorn-npm-7.4.1-f450b4646c.patch",
"acorn@7.4.1": "patch:acorn@npm:7.4.1#.yarn/patches/acorn-npm-7.4.1-f450b4646c.patch",
"object.values@^1.1.0": "patch:object.values@npm%3A1.1.5#./.yarn/patches/object.values-npm-1.1.5-f1de7f3742.patch",
"object.values@^1.1.5": "patch:object.values@npm%3A1.1.5#./.yarn/patches/object.values-npm-1.1.5-f1de7f3742.patch",
"object.values@^1.0.4": "patch:object.values@npm%3A1.1.5#./.yarn/patches/object.values-npm-1.1.5-f1de7f3742.patch",
"error@^7.0.0": "patch:error@npm%3A7.0.2#./.yarn/patches/error-npm-7.0.2-6dfbeab4da.patch",
"eslint-import-resolver-typescript@^2.5.0": "patch:eslint-import-resolver-typescript@npm%3A2.5.0#./.yarn/patches/eslint-import-resolver-typescript-npm-2.5.0-3b8adf0d03.patch",
2023-01-11 17:30:04 +01:00
"colors@1.4.0": "patch:colors@npm%3A1.4.0#./.yarn/patches/colors-npm-1.4.0-7e2cf12234.patch",
"colors@0.5.x": "patch:colors@npm%3A1.4.0#./.yarn/patches/colors-npm-1.4.0-7e2cf12234.patch",
"borc@^2.1.2": "patch:borc@npm%3A2.1.2#./.yarn/patches/borc-npm-2.1.2-8ffcc2dd81.patch",
"borc@^2.1.0": "patch:borc@npm%3A2.1.2#./.yarn/patches/borc-npm-2.1.2-8ffcc2dd81.patch",
"convert-source-map@^1.7.0": "patch:convert-source-map@npm%3A1.1.3#./.yarn/patches/convert-source-map-npm-1.1.3-7f1bfeabd4.patch",
"convert-source-map@1.7.0": "patch:convert-source-map@npm%3A1.1.3#./.yarn/patches/convert-source-map-npm-1.1.3-7f1bfeabd4.patch",
"convert-source-map@^1.0.0": "patch:convert-source-map@npm%3A1.1.3#./.yarn/patches/convert-source-map-npm-1.1.3-7f1bfeabd4.patch",
"convert-source-map@^1.8.0": "patch:convert-source-map@npm%3A1.1.3#./.yarn/patches/convert-source-map-npm-1.1.3-7f1bfeabd4.patch",
"convert-source-map@~1.1.0": "patch:convert-source-map@npm%3A1.1.3#./.yarn/patches/convert-source-map-npm-1.1.3-7f1bfeabd4.patch",
"convert-source-map@^0.3.3": "patch:convert-source-map@npm%3A1.1.3#./.yarn/patches/convert-source-map-npm-1.1.3-7f1bfeabd4.patch",
"convert-source-map@^1.5.1": "patch:convert-source-map@npm%3A1.1.3#./.yarn/patches/convert-source-map-npm-1.1.3-7f1bfeabd4.patch",
"convert-source-map@^1.5.0": "patch:convert-source-map@npm%3A1.1.3#./.yarn/patches/convert-source-map-npm-1.1.3-7f1bfeabd4.patch",
"convert-source-map@^1.4.0": "patch:convert-source-map@npm%3A1.1.3#./.yarn/patches/convert-source-map-npm-1.1.3-7f1bfeabd4.patch",
"convert-source-map@^1.6.0": "patch:convert-source-map@npm%3A1.1.3#./.yarn/patches/convert-source-map-npm-1.1.3-7f1bfeabd4.patch",
"abort-controller@^3.0.0": "patch:abort-controller@npm%3A3.0.0#./.yarn/patches/abort-controller-npm-3.0.0-2f3a9a2bcb.patch",
"await-semaphore@^0.1.1": "patch:await-semaphore@npm%3A0.1.3#./.yarn/patches/await-semaphore-npm-0.1.3-b7a0001fab.patch",
"await-semaphore@^0.1.3": "patch:await-semaphore@npm%3A0.1.3#./.yarn/patches/await-semaphore-npm-0.1.3-b7a0001fab.patch",
"eslint@8.36.0": "patch:eslint@npm%3A8.36.0#./.yarn/patches/eslint-npm-8.36.0-f8482bce95.patch",
"eslint@^8.36.0": "patch:eslint@npm%3A8.36.0#./.yarn/patches/eslint-npm-8.36.0-f8482bce95.patch",
"eth-query@^2.1.2": "patch:eth-query@npm%3A2.1.2#./.yarn/patches/eth-query-npm-2.1.2-7c6adc825f.patch",
"eth-query@^2.1.0": "patch:eth-query@npm%3A2.1.2#./.yarn/patches/eth-query-npm-2.1.2-7c6adc825f.patch",
"ethereumjs-util@^5.1.1": "patch:ethereumjs-util@npm%3A5.2.1#./.yarn/patches/ethereumjs-util-npm-5.2.1-72b39f4e7e.patch",
"ethereumjs-util@^5.1.2": "patch:ethereumjs-util@npm%3A5.2.1#./.yarn/patches/ethereumjs-util-npm-5.2.1-72b39f4e7e.patch",
"ethereumjs-util@^5.1.5": "patch:ethereumjs-util@npm%3A5.2.1#./.yarn/patches/ethereumjs-util-npm-5.2.1-72b39f4e7e.patch",
"ethereumjs-util@^5.0.0": "patch:ethereumjs-util@npm%3A5.2.1#./.yarn/patches/ethereumjs-util-npm-5.2.1-72b39f4e7e.patch",
"ethereumjs-util@^5.2.0": "patch:ethereumjs-util@npm%3A5.2.1#./.yarn/patches/ethereumjs-util-npm-5.2.1-72b39f4e7e.patch",
"ethereumjs-util@^7.0.10": "patch:ethereumjs-util@npm%3A7.1.5#./.yarn/patches/ethereumjs-util-npm-7.1.5-5bb4d00000.patch",
"ethereumjs-util@^7.1.5": "patch:ethereumjs-util@npm%3A7.1.5#./.yarn/patches/ethereumjs-util-npm-7.1.5-5bb4d00000.patch",
"ethereumjs-util@^7.1.4": "patch:ethereumjs-util@npm%3A7.1.5#./.yarn/patches/ethereumjs-util-npm-7.1.5-5bb4d00000.patch",
"ethereumjs-util@^7.0.9": "patch:ethereumjs-util@npm%3A7.1.5#./.yarn/patches/ethereumjs-util-npm-7.1.5-5bb4d00000.patch",
"ethereumjs-util@^7.1.0": "patch:ethereumjs-util@npm%3A7.1.5#./.yarn/patches/ethereumjs-util-npm-7.1.5-5bb4d00000.patch",
"ethereumjs-util@^7.0.2": "patch:ethereumjs-util@npm%3A7.1.5#./.yarn/patches/ethereumjs-util-npm-7.1.5-5bb4d00000.patch",
"ethereumjs-util@^7.0.8": "patch:ethereumjs-util@npm%3A7.1.5#./.yarn/patches/ethereumjs-util-npm-7.1.5-5bb4d00000.patch",
"ethereumjs-util@^7.0.7": "patch:ethereumjs-util@npm%3A7.1.5#./.yarn/patches/ethereumjs-util-npm-7.1.5-5bb4d00000.patch",
"fast-json-patch@^2.2.1": "patch:fast-json-patch@npm%3A2.2.1#./.yarn/patches/fast-json-patch-npm-2.2.1-63b021bb37.patch",
"fast-json-patch@^2.0.6": "patch:fast-json-patch@npm%3A2.2.1#./.yarn/patches/fast-json-patch-npm-2.2.1-63b021bb37.patch",
"gulp-sourcemaps@^3.0.0": "patch:gulp-sourcemaps@npm%3A3.0.0#./.yarn/patches/gulp-sourcemaps-npm-3.0.0-1ae0fbef6d.patch",
"inline-source-map@~0.6.0": "patch:inline-source-map@npm%3A0.6.2#./.yarn/patches/inline-source-map-npm-0.6.2-96902459a0.patch",
"plugin-error@^1.0.1": "patch:plugin-error@npm%3A1.0.1#./.yarn/patches/plugin-error-npm-1.0.1-7d15e880d6.patch",
"plugin-error@1.0.1": "patch:plugin-error@npm%3A1.0.1#./.yarn/patches/plugin-error-npm-1.0.1-7d15e880d6.patch",
"regenerator-runtime@^0.13.4": "patch:regenerator-runtime@npm%3A0.13.7#./.yarn/patches/regenerator-runtime-npm-0.13.7-41bcbe64ea.patch",
"regenerator-runtime@^0.13.7": "patch:regenerator-runtime@npm%3A0.13.7#./.yarn/patches/regenerator-runtime-npm-0.13.7-41bcbe64ea.patch",
"regenerator-runtime@^0.11.0": "patch:regenerator-runtime@npm%3A0.13.7#./.yarn/patches/regenerator-runtime-npm-0.13.7-41bcbe64ea.patch",
devDeps: jsdom@11.12.0->16.7.0 (#19971) * bump parse5; port patch * devDeps: jsdom@11.5.1->16.7.0 - patch-revert https://github.com/jsdom/jsdom/pull/2076 - jsdom's storage-overriding does not play well with test suite usage of localforage: $ yarn test:unit:global ✖ ERROR: TypeError: Cannot set property localStorage of #<Window> which has only a getter at Object.<anonymous> (/app/test/helpers/setup-helper.js:79:32) at Module._compile (node:internal/modules/cjs/loader:1198:14) at Module.m._compile (/app/node_modules/ts-node/src/index.ts:1459:23) at Module._compile (/app/node_modules/pirates/lib/index.js:136:24) at Module._extensions..js (node:internal/modules/cjs/loader:1252:10) at newLoader (/app/node_modules/pirates/lib/index.js:141:7) at Object.require.extensions.<computed> [as .js] (/app/node_modules/ts-node/src/index.ts:1462:12) at Module.load (node:internal/modules/cjs/loader:1076:32) at Function.Module._load (node:internal/modules/cjs/loader:911:12) at Module.require (node:internal/modules/cjs/loader:1100:19) at require (node:internal/modules/cjs/helpers:108:18) at Object.<anonymous> (/app/test/setup.js:4:1) at Module._compile (node:internal/modules/cjs/loader:1198:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) at Module.load (node:internal/modules/cjs/loader:1076:32) at Function.Module._load (node:internal/modules/cjs/loader:911:12) at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29) at ModuleJob.run (node:internal/modules/esm/module_job:193:25) at async Promise.all (index 0) at ESMLoader.import (node:internal/modules/esm/loader:530:24) at importModuleDynamicallyWrapper (node:internal/vm/module:438:15) at formattedImport (/app/node_modules/mocha/lib/nodejs/esm-utils.js:7:14) at exports.requireOrImport (/app/node_modules/mocha/lib/nodejs/esm-utils.js:48:32) at exports.handleRequires (/app/node_modules/mocha/lib/cli/run-helpers.js:94:28) at /app/node_modules/mocha/lib/cli/run.js:353:25 * update lavamoat policies * update lavamoat build policy
2023-07-13 16:06:08 +02:00
"jsdom@^16.7.0": "patch:jsdom@npm%3A16.7.0#./.yarn/patches/jsdom-npm-16.7.0-216c5c4bf9.patch",
"trim": "^0.0.3",
"@eslint/eslintrc@^2.0.1": "patch:@eslint/eslintrc@npm%3A2.0.2#./.yarn/patches/@eslint-eslintrc-npm-2.0.2-d308674d86.patch",
"@fortawesome/fontawesome-free@^5.13.0": "patch:@fortawesome/fontawesome-free@npm%3A5.13.0#./.yarn/patches/@fortawesome-fontawesome-free-npm-5.13.0-f20fc0388d.patch",
"@keystonehq/bc-ur-registry@^0.5.0-alpha.5": "patch:@keystonehq/bc-ur-registry@npm%3A0.5.0-alpha.5#./.yarn/patches/@keystonehq-bc-ur-registry-npm-0.5.0-alpha.5-b95c7992a6.patch",
"@lavamoat/lavapack@^3.1.0": "patch:@lavamoat/lavapack@npm%3A3.1.0#./.yarn/patches/@lavamoat-lavapack-npm-3.1.0-34c65d233b.patch",
2023-01-04 18:29:37 +01:00
"fast-json-patch@^3.1.0": "patch:fast-json-patch@npm%3A3.1.1#./.yarn/patches/fast-json-patch-npm-3.1.1-7e8bb70a45.patch",
"@reduxjs/toolkit@^1.6.2": "patch:@reduxjs/toolkit@npm%3A1.6.2#./.yarn/patches/@reduxjs-toolkit-npm-1.6.2-67af09515f.patch",
devDeps: jsdom@11.12.0->16.7.0 (#19971) * bump parse5; port patch * devDeps: jsdom@11.5.1->16.7.0 - patch-revert https://github.com/jsdom/jsdom/pull/2076 - jsdom's storage-overriding does not play well with test suite usage of localforage: $ yarn test:unit:global ✖ ERROR: TypeError: Cannot set property localStorage of #<Window> which has only a getter at Object.<anonymous> (/app/test/helpers/setup-helper.js:79:32) at Module._compile (node:internal/modules/cjs/loader:1198:14) at Module.m._compile (/app/node_modules/ts-node/src/index.ts:1459:23) at Module._compile (/app/node_modules/pirates/lib/index.js:136:24) at Module._extensions..js (node:internal/modules/cjs/loader:1252:10) at newLoader (/app/node_modules/pirates/lib/index.js:141:7) at Object.require.extensions.<computed> [as .js] (/app/node_modules/ts-node/src/index.ts:1462:12) at Module.load (node:internal/modules/cjs/loader:1076:32) at Function.Module._load (node:internal/modules/cjs/loader:911:12) at Module.require (node:internal/modules/cjs/loader:1100:19) at require (node:internal/modules/cjs/helpers:108:18) at Object.<anonymous> (/app/test/setup.js:4:1) at Module._compile (node:internal/modules/cjs/loader:1198:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) at Module.load (node:internal/modules/cjs/loader:1076:32) at Function.Module._load (node:internal/modules/cjs/loader:911:12) at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29) at ModuleJob.run (node:internal/modules/esm/module_job:193:25) at async Promise.all (index 0) at ESMLoader.import (node:internal/modules/esm/loader:530:24) at importModuleDynamicallyWrapper (node:internal/vm/module:438:15) at formattedImport (/app/node_modules/mocha/lib/nodejs/esm-utils.js:7:14) at exports.requireOrImport (/app/node_modules/mocha/lib/nodejs/esm-utils.js:48:32) at exports.handleRequires (/app/node_modules/mocha/lib/cli/run-helpers.js:94:28) at /app/node_modules/mocha/lib/cli/run.js:353:25 * update lavamoat policies * update lavamoat build policy
2023-07-13 16:06:08 +02:00
"parse5@^7.0.0": "patch:parse5@npm%3A7.1.2#./.yarn/patches/parse5-npm-7.1.2-aa9a92c270.patch",
"@types/madge@^5.0.0": "patch:@types/madge@npm%3A5.0.0#./.yarn/patches/@types-madge-npm-5.0.0-654566c2d2.patch",
"zxcvbn@^4.4.2": "patch:zxcvbn@npm%3A4.4.2#./.yarn/patches/zxcvbn-npm-4.4.2-6527983856.patch",
"web3@^0.20.7": "patch:web3@npm%3A0.20.7#./.yarn/patches/web3-npm-0.20.7-ee7ef00c57.patch",
"watchify@^4.0.0": "patch:watchify@npm%3A4.0.0#./.yarn/patches/watchify-npm-4.0.0-4fd965dd49.patch",
"undeclared-identifiers@^1.1.2": "patch:undeclared-identifiers@npm%3A1.1.2#./.yarn/patches/undeclared-identifiers-npm-1.1.2-13d6792e9e.patch",
"sass@^1.32.4": "patch:sass@npm%3A1.35.2#./.yarn/patches/sass-npm-1.35.2-6df4e15d13.patch",
"sass@^1.26.3": "patch:sass@npm%3A1.35.2#./.yarn/patches/sass-npm-1.35.2-6df4e15d13.patch",
"sass@^1.29.0": "patch:sass@npm%3A1.35.2#./.yarn/patches/sass-npm-1.35.2-6df4e15d13.patch",
"squirrelly@^9.0.0": "patch:squirrelly@npm%3A9.0.0#./.yarn/patches/squirrelly-npm-9.0.0-3cf710c7bb.patch",
"stylelint@^13.6.1": "patch:stylelint@npm%3A13.6.1#./.yarn/patches/stylelint-npm-13.6.1-47aaddf62b.patch",
"luxon@^3.0.1": "patch:luxon@npm%3A3.2.1#./.yarn/patches/luxon-npm-3.2.1-56f8d97395.patch",
"luxon@^3.2.1": "patch:luxon@npm%3A3.2.1#./.yarn/patches/luxon-npm-3.2.1-56f8d97395.patch",
2023-01-04 18:29:37 +01:00
"symbol-observable": "^2.0.3",
"async-done@~1.3.2": "patch:async-done@npm%3A1.3.2#./.yarn/patches/async-done-npm-1.3.2-1f0a4a8997.patch",
"async-done@^1.2.0": "patch:async-done@npm%3A1.3.2#./.yarn/patches/async-done-npm-1.3.2-1f0a4a8997.patch",
"async-done@^1.2.2": "patch:async-done@npm%3A1.3.2#./.yarn/patches/async-done-npm-1.3.2-1f0a4a8997.patch",
2023-04-04 12:38:49 +02:00
"fast-json-patch@^3.1.1": "patch:fast-json-patch@npm%3A3.1.1#./.yarn/patches/fast-json-patch-npm-3.1.1-7e8bb70a45.patch",
"request@^2.83.0": "patch:request@npm%3A2.88.2#./.yarn/patches/request-npm-2.88.2-f4a57c72c4.patch",
"request@^2.88.2": "patch:request@npm%3A2.88.2#./.yarn/patches/request-npm-2.88.2-f4a57c72c4.patch",
"request@^2.85.0": "patch:request@npm%3A2.88.2#./.yarn/patches/request-npm-2.88.2-f4a57c72c4.patch",
"lavamoat-core@^14.2.0": "patch:lavamoat-core@npm%3A14.2.0#./.yarn/patches/lavamoat-core-npm-14.2.0-c453f4f755.patch",
"@metamask/keyring-controller@^7.2.0": "patch:@metamask/keyring-controller@npm%3A7.2.0#~/.yarn/patches/@metamask-keyring-controller-npm-7.2.0-fcc0c7893b.patch",
"@metamask/signature-controller@^5.3.0": "patch:@metamask/signature-controller@npm%3A5.3.0#./.yarn/patches/@metamask-signature-controller-npm-5.3.0-225628460b.patch",
"semver@7.3.7": "^7.5.4",
"semver@7.3.8": "^7.5.4"
3box integration 2.0 (#6972) * Adds threebox controller * Adds threebox approval modal * Fix unit tests and lint after addition of threebox * Correct threebox behaviour after rejecting request for backup; fixes e2e tests. * Update threebox controller for automatic syncing * Ensure frontend locale updates when preferences are changed via direct update within controller * Add toggle in settings for 3box syncing * Update threebox controller for latest 3box version * Delete unnecessary frontend changes for threebox integration * Backing up address book contacts with threebox * Update unit tests for 3box-integration additions * Only enable threebox by default for new wallets * Mock globals for correct unit tests * 3box '1.10.2' -> '^1.10.2' * Correct capilalization on 3Box * Use log.debug instead of console.log in threebox controller * Update yarn.lock * Remove edge build * Split 3box module into background deps js file * extra bundle opts for bg-libs * sync yarn.lock * new3Box logic * Show confirm threebox restore after import * Remove bg-libs.js from manifest file for dev builds * Switch 3Box controller to using the spaces api (instead of the profile api) * Finalize switching to spaces api and only restoring from 3box after import * Update metamask-controller-test.js for threebox controller changes * Make threebox modal style consistent with others and update success button wording * Use mock 3box when in test * Correct 3box modal header * Remove unnecessary property of threebox controller provider * Remove unnecessary method calls after restoration from 3box in the threebox-restore-confirm modal. * Replace setThreeBoxSyncingPermission calls in routes/index.js with turnThreeBoxSyncingOn * Replace erroneous use of with * Replace erroneous use of threeboxSyncing with threeBoxSyncingAllowed in advancted-tab directory * Lint fixes for 3box changes * Log errors encountered when updating 3Box * Remove unnecessary parameter from state update * Add timeout to initial 3Box sync The initial 3Box sync will now timeout after 1 minute. If the timeout is triggered, 3Box is disabled and cannot be re-enabled unless the initial sync does finally finish. If it never finishes, 3Box cannot be enabled unless the extension is reinstalled. The Advanced Settings page was updated to show this option as disabled in that circumstance, with a new discription explaining why it's disabled. The UI here could certainly be improved. Additionally, "on" and "off" labels were added to the toggle to match the other toggles on the Advanced Settings page. * Use non-minified 3Box module We had previously used the minified 3Box module to avoid a build error encountered when `envify` was processing the `libp2p` module (which is used by 3Box). The build would fail because `esprima` (used by `envify`) is incompatible with the object spread/rest operator (which is used in `libp2p`). That issue has been solved by adding a global Babelify transformation specifically for transpiling out the object rest/spread operator from dependencies. It has been targetted to only affect `libp2p` to avoid extending the build time too much. This workaround can be used until a new version of `esprima` is released that includes this bug fix. * Use app key addresses for threebox * Replace use of modal for confirming 3box restoration with a home notification * Adds e2e tests for restoring from threebox * Update eth-keyring-controller to 5.1.0 * Correct parameters passed to getAppKeyAddress in threebox.js * Add prefix to origin passed to getAppKeyAddress in threebox.js * Remove unused locale message. * Prevent CORS errors in firefox e2e tests * Ensure extraneous scripts are excluded from the local test dev build * Move threeBoxLastUpdate state from home.component to redux * Threebox PR code cleanup * Always use first address when initializing threebox * Replace setRestoredFromThreeBox api with setRestoredFromThreeBoxToFalse and setRestoredFromThreeBoxToTrue * Update development/metamaskbot-build-announce.js to include ui-libs and bg-libs in hard coded bundle list * Update test/e2e/threebox.spec.js to use new helpers added with pull #7144 * Make setFeatureFlag available on the ui window during testing * Hide threebox feature behind a feature flag that can only be activated via dev console * Remove unnecessary migration of threebox feature flag * Prevent this.init() call in threebox constructor if feature flag is not turned on * Prevent threebox notification from showing if feature flag is falsy * http://localhost/8889 -> http://localhost/* in gulp manifest:testing tasks
2019-09-16 19:11:01 +02:00
},
2015-08-01 03:38:02 +02:00
"dependencies": {
"@babel/runtime": "^7.18.9",
"@blockaid/ppom_release": "^1.2.6",
"@download/blockies": "^1.0.3",
"@ensdomains/content-hash": "^2.5.6",
"@ethereumjs/common": "^3.1.1",
"@ethereumjs/tx": "^4.1.1",
"@ethersproject/abi": "^5.6.4",
"@ethersproject/bignumber": "^5.6.2",
"@ethersproject/contracts": "^5.7.0",
"@ethersproject/hdnode": "^5.6.2",
"@ethersproject/providers": "^5.7.2",
"@fortawesome/fontawesome-free": "^5.13.0",
"@keystonehq/bc-ur-registry-eth": "^0.19.1",
"@keystonehq/metamask-airgapped-keyring": "^0.13.1",
2023-03-08 12:09:16 +01:00
"@lavamoat/snow": "^1.5.0",
2020-07-09 23:05:44 +02:00
"@material-ui/core": "^4.11.0",
"@metamask-institutional/custody-controller": "^0.2.10",
"@metamask-institutional/custody-keyring": "^0.0.27",
"@metamask-institutional/extension": "^0.3.3",
"@metamask-institutional/institutional-features": "^1.2.2",
"@metamask-institutional/portfolio-dashboard": "^1.4.0",
"@metamask-institutional/rpc-allowlist": "^1.0.0",
"@metamask-institutional/sdk": "^0.1.18",
"@metamask-institutional/transaction-update": "^0.1.25",
"@metamask/address-book-controller": "^3.0.0",
"@metamask/announcement-controller": "^4.0.0",
"@metamask/approval-controller": "^3.4.0",
"@metamask/assets-controllers": "^9.2.0",
"@metamask/base-controller": "^3.2.0",
"@metamask/browser-passworder": "^4.1.0",
"@metamask/contract-metadata": "^2.3.1",
"@metamask/controller-utils": "^4.2.0",
"@metamask/design-tokens": "^1.12.0",
"@metamask/desktop": "^0.3.0",
"@metamask/eth-json-rpc-middleware": "^11.0.0",
"@metamask/eth-keyring-controller": "^10.0.1",
"@metamask/eth-ledger-bridge-keyring": "^0.15.0",
[FLASK] Add Snaps Keyring (#19710) * flask - add restricted snap_manageAccounts * snap keyring: use local snap keyring instead of package * mvp snap-keyring * fixed the easier lint errors * fix missing permission text * add removal function * update snap keyring * update dep * update git link * update messages and remove snap keyring from lib * set snapprovider as soon as possible * chore: update snap keyring dependency * chore: pass SnapController to SnapKeyring constructor * chore: update deps and comment line (wip) * fix latest update for snaps and remove setController * update yarn lock * add routes * add messages * add message * add snap account detail page * add snap account card * add snap account page * update route * add background * use css grid * update snap text styling * fix lint * remove unused import * change manage link to go to snap * add types for react-router-dom * add link to settings * add breadcrumb to header * add popover * add prop types * add link to propTypes * fix icon in header and tag * update popover * update yarn.lock * add link to account list menu * update from deprecated * add add-snap-popup * use popoverheader * fix lint * update to use modal instead of popup * add install snap * remove export of DeferredPromise * change snap keyring to its own enum * update imports and fences * fix snapId and route * fix header and button for snapCard * hide app header on AddSnapAccountPage * update icon * match path to SnapAccountDetail * set getting started button to close modal * fix key prop warning * add By Metamask message * fix label * add fence to snapkeyringtype * update yarn.lock * refactor removeAccount and static snap list * update removeSnap * feat: remove associated accounts when snap is removed * add get snaps installed to snaps page * fix updateAvailable * add tests to ui components * update test * update scss * udpate config snap popup style * fixed https://www.notion.so/Show-pop-up-only-once-c6aa8494486a4ece8a5c5e35fea56ab5 * update accountListMenu click to open tab or push depending on environment * update yark.lock * remove unused uuid * update lock * update eth-snap-keyring * udpate install from snap page * update to install to use popup * use release versino of eth-snap-keyring * chore: bump snaps-utils version to `0.34.1-flask.1` * update configure snap * chore: update eth-snap-keyring * chore: update policies * fix: remove unused * fix: fix snap-account-detail-page test * fix: fix styles * chore: remove swappable-obj-proxy * fix: fix duplicate entry * fix: disable export private key for snaps account * feat: shuffle snap lists on every reload * fix: configure not popping up * refactor: snapsAddSnapAccountModalDismissal into action and selector * fix: E2BIG when running prettier * fix: lint default export or add-snap-account-modal * fix: lint, remove vendor prefix * fix: fix snapCreatedByMetamask to snapCreatedByMetaMask * Add `manageAccounts` RPC method (#19724) * Update dependencies * Remove snap-keyring-permissions * Update dependencies * Update dependencies * Update imports * removed portfolio link from wallet view (#19716) * removed portfolio link from wallet view * removed unused code * updated test * updated spec file * updated test * Validate LavaMoat policies on each PR (#19703) * Validate LavaMoat policies on each PR The LavaMoat policies are now validated on every PR. This makes it easier to validate policy changes, as they should always correspond with the changes made in the PR (unlike today, when they could be due to a change in platform or a previous PR). Closes #19680 * Update LavaMoat policies --------- Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com> * fix(action): add required permissions to remove labels (#19728) * Fix dependencies * signature approved metrics e2e test (#19628) * Update dependencies * Integrate Snow with LavaMoat scuttling protection (#17969) * Update lavamoat policies * Security Provider cleanup (#19694) * security-prov: isFlaggedSecurityProviderResponse * security-prov: create shared/modules/util * security prov: rn isFlagged -> isSuspcious - util fn returns true if response is not verified and flagged * security prov: add util test and support undefined param * security prov: reorg util fn - no logic changes * Update LavaMoat policies (#19744) Update LavaMoat policies to match what CI expects. * Replacing deprecated constants & creating stories (#19686) * Replacing deprecated constants & creating stories * updating snapshot * fix: fix imports * chore: update policy.json * fix: move SmartTransactionController out of snaps code fence * fix: yarn.lock dedupe * fix: lavamoat policy * fix: update test * fix: remove snapshot, the list of snaps are always randomized. * fix: resole snaps-controller to use flask --------- Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net> Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com> Co-authored-by: Gauthier Petetin <gauthierpetetin@hotmail.com> Co-authored-by: Brad Decker <bhdecker84@gmail.com> Co-authored-by: weizman <weizmangal@gmail.com> Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com> Co-authored-by: Dhruv <79097544+dhruvv173@users.noreply.github.com> Co-authored-by: Monte Lai <monte.lai@consensys.net> * Update LavaMoat policies * chore: fix webapp policy.json * feat: add snap label test * feat: test to disable export private key for snap accounts * feat: add snap account link test in account-list-menu * fix: add fence for setSnapsAddSnapAccountModalDismissed * fix: remove comments * fix: move routes into snaps fence * feat: use snap registry * fix: account snap identification * chore: add `keyring-snaps` feature flag * fix: remove unneeded spread * Disable warn logs in content-script (#19754) * Use Yarn caching in GitHub Actions (#19662) GitHub actions that install dependencies will now also cache those dependencies using the standard strategy for Yarn (which is to hash the lockfile). This matches the module template (see https://github.com/MetaMask/metamask-module-template/pull/145 for details). This should have no functional impact except that this action will run faster when dependencies are unchanged. * Fixing misspelling in 10.28.0 changelog notes (#19756) * Add `tokenId` type validation in `wallet_watchAsset` middleware (#19738) * Remove unused GitHub Action workflow (#19660) This GitHub action workflow was disabled, but was still running setup steps. It has now been removed entirely. We can re-introduce it again later once the problem that led to it being disabled has been fixed. The associated npm script and JavaScript module have been removed as well. * Fix #847 - Don't show account address on token pages (#19740) Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net> * Deprecating FormField and fixing console error (#19739) * Deprecating FormField and fixing console error * Updating snapshots * updated linea image for token and badge (#19717) * updated linea image for token and badge * replaced hardcoded string with constant * UI updates for contacts Page (#19646) * updated contacts flow update * json file updates * updated contacts edit and view list * keep contacts tab selected * lint fix * replaced hardcoded strings with constant * updated padding in box * Replacing deprecated components and fixing prop errors (#19745) * Use `snaps@0.35.2-flask.1` and `snaps@1.0.0-prerelease.1` (#19734) * snaps@0.35.0-flask.1 * Update LavaMoat policies * Update stable snaps packages to 1.0.0-prerelease.1 * Update LavaMoat policies * Fix lint * snaps@0.35.2 * Exclude snap_manageAccounts * Code fencing * Revert removing endowment:keyring exclusion * Bump iframe URLs * UX: Ensure multichain native token name is always shown (#19705) * UX: Ensure multichain native token name is always shown * Fix lint * UX Multichain: fixed padding for edit screen (#19707) * fixed padding for edit screen * Use network picker for header trigger * Fix swaps display * updated snapshot --------- Co-authored-by: David Walsh <davidwalsh83@gmail.com> * Bump @metamask/providers to v11.1.0 (#19762) * Bump @metamask/providers to v11.1.0 --------- Co-authored-by: Alex <adonesky@gmail.com> * Fix fallback gas estimation (#19746) * Fix fallback gas estimation Our fallback gas estimation was failing due to a bug in the `@metamask/controller-utils` package. This was causing gas estimation to fail completely on certain networks (those not supported by our gas estimation APIs and non EIP-1559 compatibile), and it was causing the fallback gas estimation operation (in case our API was down) to fail across all networks. Fixes https://github.com/MetaMask/metamask-extension/issues/19735 * Add e2e tests E2E tests have been added to capture gas estimation. Cases are added for our API, for the fallback estimate, and for non-EIP-1559 estimates. As part of this work, the legacy gas API had to be disabled. This was being used in e2e tests but was dead code in production. It needed to be disabled to ensure the code under test was reachable. * Fix gas API referenced in e2e test * Update unit test snapshots * Update Label component font weight from bold to medium (#19731) * Update Label component font weight from bold to medium * update snapshot * fix snapshots * fix snapshots 2 * Removeing deprecated constants for enums --------- Co-authored-by: georgewrmarshall <george.marshall@consensys.net> * Part of #17670: Replace Typography with Text component in CancelSpeedupPopover (#18638) * create story * replace Typography with Text component * review changes * replace CSS with props styling * use `Button` from `component-library` * tooltip HTML refactor with `component-library` components * remove whitespace in story * strong tag support within Text component * addresses #18651 * taken from #18752 as suggested in https://github.com/MetaMask/metamask-extension/pull/18638#discussion_r1176334805 * replace `strong` with new `Text as="strong"` * remove unneccessary css from fa564e3f036f1439f9f220cca23595b508760614 * add text variant definition * Updating text variant of button * restrore proper spacing between elements * Quick fix for test * Adding key --------- Co-authored-by: georgewrmarshall <george.marshall@consensys.net> Co-authored-by: Garrett Bear <gwhisten@gmail.com> * Issue 17670 replace typography with text (#19433) * Replace Typograph with Text component in numeric-input-component.js * Replace Typography with Text component in signature-request-message.js * Replace Typography with Text component in signature-request.component.js * Replacing deprecating constants and fixing some signature story warnings * Updating snapshot * Fixing import --------- Co-authored-by: georgewrmarshall <george.marshall@consensys.net> Co-authored-by: Garrett Bear <gwhisten@gmail.com> * Part of #18714: Replacing deprecated constants in `confirm-subtitle` folder (#19699) * repalcing deprecated constants * resolve issue * lint fixes --------- Co-authored-by: georgewrmarshall <george.marshall@consensys.net> * Part of #17670: Replace Typography with Text component in: callout.js (#18912) * Part of #17670: Replace Typography with Text component in: callout.js * Update ui/components/ui/callout/callout.js Co-authored-by: Danica Shen <zhaodanica@gmail.com> * Update callout.js * Updating snapshot and deprecating component * Updating snapshot and deprecating component --------- Co-authored-by: Danica Shen <zhaodanica@gmail.com> Co-authored-by: George Marshall <george.marshall@consensys.net> Co-authored-by: Garrett Bear <gwhisten@gmail.com> * [MMI] Added code fences in whats new popup (#19581) * added code fences in whats new popup * Improved code * Added missing prop * Update LavaMoat policies * updated functions by using an options object for the rendering functions in order to bypass possible typsecript issues --------- Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com> * Updated action list in token, NFTs and activity view (#19702) * updated ui for nft import button * updated no nft image found in the center * updated footer for all screens in tabs * removed no nft state from nft tab * updated snapshot * lint fix * fixed e2e tests * fixed prep build error * removed no nfts yet test * updated tabs * fixed prod error * updated no nft screen * changed button size to md * fix: change 'M' to '?' * fix: update fence to keyring-snaps * chore: rename folder * fix: typo * chore: remove logs * feat: add metamask developer constant * fix: sass keyring-snap path * chore: update yarn.lock * fix: remove alias * feat: add KEYRING_SNAPS_REGISTRY_URL env * fix: nested fence * feat: add snap manageAccount e2e (#19777) * feat: add snap manageAccount e2e * feat: update link * fix: lint * fix: get values of restrictedMethodPermissionBuilders * fix: add fence to perferences * fix: stop shuffle * fix: remove KEYRING_SNAPS_REGISTRY_URL from metamaskRc * fix: use permissions to determine account snaps * fix: remove shuffle * fix: add comments to fences in excluded snap permission. * chore: fix policy.json * fix: fix snap-account-detail test * fix: lint * fix: snap accoutn detail page test * Update LavaMoat policies * Update ui/pages/keyring-snaps/snap-account-detail-page/snap-account-detail-page.test.tsx Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> * Update ui/pages/keyring-snaps/snap-account-detail-page/snap-account-detail-page.test.tsx Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> * fix: remove fence from isAbleToExportAccount * chore: remove comment line * fix: dismiss snap modal * fix: try catch for scroll * fix: icon for manageAccount * fix: update `handleSnapRequest` to make `params` optional and add `id` * fix: lint for uuid * fix: remove arg in saveSnapKeyring * fix: add fence for uuidV4 * chore: bump dep * fix: permission_manageAccounts message and icon * chore: update registry link * chore: convert address to lowercase * fix: change icon * chore: bump eth-snap-keyring * chore: update webapp policy.json * Update ui/pages/keyring-snaps/new-snap-account-page/new-snap-account-page.test.tsx Co-authored-by: Gustavo Antunes <17601467+gantunesr@users.noreply.github.com> * fix: update fences * fix: nested fence * Update app/_locales/en/messages.json Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> * Update app/_locales/en/messages.json Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> * Update app/_locales/en/messages.json Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> * Update app/_locales/en/messages.json Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> * Update ui/components/multichain/account-details/account-details-display.js Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> * Update ui/pages/keyring-snaps/snap-account-detail-page/header.tsx Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> * Update ui/pages/keyring-snaps/snap-account-detail-page/snap-account-detail-page.tsx Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> * fix: rename and added jsdoc * fix: add fence to snap label * fix: remove comment * fix: change pixel to int and remove unused class * fix: lint * fix: create two tests for main and flask restricted methods * fix: remove fence in test * fix: lint header * feat: allow `metamask.github.io` in manifest * fix: remove comment * fix: rename isAbleToExportAccount * chore: use a more restrictive registry URL * fix: change to && not || * fix: remove unused * fix: move keyring snaps URL to Flask's base manifest * fix: use fetch instead of fetchWithCache * fix: lint --------- Co-authored-by: kumavis <aaron@kumavis.me> Co-authored-by: Howard Braham <howrad@gmail.com> Co-authored-by: Daniel Rocha <68558152+danroc@users.noreply.github.com> Co-authored-by: Gustavo Antunes <17601467+gantunesr@users.noreply.github.com> Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net> Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com> Co-authored-by: Gauthier Petetin <gauthierpetetin@hotmail.com> Co-authored-by: Brad Decker <bhdecker84@gmail.com> Co-authored-by: weizman <weizmangal@gmail.com> Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com> Co-authored-by: Dhruv <79097544+dhruvv173@users.noreply.github.com> Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: Alex Donesky <adonesky@gmail.com> Co-authored-by: David Walsh <davidwalsh83@gmail.com> Co-authored-by: George Marshall <george.marshall@consensys.net> Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com> Co-authored-by: jiexi <jiexiluan@gmail.com> Co-authored-by: jainex <jainexp017@gmail.com> Co-authored-by: Matthias Kretschmann <m@kretschmann.io> Co-authored-by: Garrett Bear <gwhisten@gmail.com> Co-authored-by: Ujwal Kumar <ujwalkumar95@gmail.com> Co-authored-by: rohit kerkar <129620973+rohiiittttt@users.noreply.github.com> Co-authored-by: Harsh Shukla <125105825+PrgrmrHarshShukla@users.noreply.github.com> Co-authored-by: Danica Shen <zhaodanica@gmail.com> Co-authored-by: Albert Olivé <albertolivecorbella@gmail.com> Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>
2023-06-29 15:24:08 +02:00
"@metamask/eth-snap-keyring": "^0.1.3",
"@metamask/eth-token-tracker": "^4.0.0",
"@metamask/eth-trezor-keyring": "^1.1.0",
"@metamask/etherscan-link": "^2.2.0",
"@metamask/gas-fee-controller": "^6.0.1",
"@metamask/jazzicon": "^2.0.0",
"@metamask/key-tree": "^9.0.0",
"@metamask/keyring-controller": "^7.2.0",
"@metamask/logo": "^3.1.1",
2023-08-14 18:18:40 +02:00
"@metamask/message-manager": "^7.3.0",
"@metamask/metamask-eth-abis": "^3.0.0",
"@metamask/network-controller": "^12.0.0",
"@metamask/notification-controller": "^3.0.0",
"@metamask/obs-store": "^8.1.0",
"@metamask/permission-controller": "^4.0.0",
"@metamask/phishing-controller": "^6.0.0",
"@metamask/post-message-stream": "^6.2.0",
2023-09-07 02:18:58 +02:00
"@metamask/ppom-validator": "^0.5.0",
"@metamask/providers": "^11.1.0",
"@metamask/rate-limit-controller": "^3.0.0",
"@metamask/rpc-methods": "^1.0.2",
"@metamask/rpc-methods-flask": "npm:@metamask/rpc-methods@0.37.2-flask.1",
"@metamask/safe-event-emitter": "^2.0.0",
"@metamask/scure-bip39": "^2.0.3",
"@metamask/signature-controller": "^5.3.0",
"@metamask/slip44": "^3.0.0",
"@metamask/smart-transactions-controller": "^4.0.0",
"@metamask/snaps-controllers": "^1.0.2",
"@metamask/snaps-controllers-flask": "npm:@metamask/snaps-controllers@0.38.0-flask.1",
"@metamask/snaps-ui": "^1.0.2",
"@metamask/snaps-ui-flask": "npm:@metamask/snaps-ui@0.37.3-flask.1",
"@metamask/snaps-utils": "^1.0.2",
"@metamask/snaps-utils-flask": "npm:@metamask/snaps-utils@0.38.0-flask.1",
"@metamask/subject-metadata-controller": "^2.0.0",
"@metamask/utils": "^5.0.0",
"@ngraveio/bc-ur": "^1.1.6",
Improve account options menu (#8607) The account options menu is now much faster, and it correctly closes when 'Switch account' is selected. A static width had to be set on the menu so that it could be positioned reliably. Without this width set, it was rendered as a different size before positioning than after, which resulted in it being positioned incorrectly. A `z-index` had to be added (equal to the `z-index` used by the popover component) to ensure it wasn't rendered beneath the popover. The menu is automatically positioned relative to the account options button, appearing below the button by default but above it instead if there isn't room below. It is positioned to be inside the bounds of the popover as well. The account options button is now a `<button>` rather than a `<i>`. This required a few additional style rules to overrule the default button styles. Additionally the size was increased so that it matches the designs more closely. The callbacks for connecting, disconnecting, and switching accounts have been updated to use state and props to determine the correct address to use, rather than being bound to the correct address parameter in the render function. This means we aren't creating a new function upon each render anymore. The `showAccountOptions` method still needs to be bound once per account, but this was switched to use more readable syntax (`.bind`, instead of the double arrow function). `react-popper` and `@popperjs/core` were both added as dependencies. These should be used for any UI requiring relative positioning (e.g. tooltips, menus, etc.). Older versions of these libraries are already in our codebase as transitive dependencies of the tooltip library we're using.
2020-05-18 19:51:29 +02:00
"@popperjs/core": "^2.4.0",
"@reduxjs/toolkit": "^1.6.2",
2022-10-11 17:04:32 +02:00
"@segment/loosely-validate-event": "^2.0.0",
"@sentry/browser": "^7.53.0",
"@sentry/integrations": "^7.53.0",
"@sentry/types": "^7.53.0",
"@sentry/utils": "^7.53.0",
2023-01-11 17:30:04 +01:00
"@truffle/codec": "^0.14.12",
"@truffle/decoder": "^5.3.5",
"@zxing/browser": "^0.1.3",
"@zxing/library": "0.20.0",
"await-semaphore": "^0.1.1",
"base32-encode": "^1.2.0",
"base64-js": "^1.5.1",
"bignumber.js": "^4.1.0",
"bn.js": "^5.2.1",
"bowser": "^2.11.0",
"classnames": "^2.2.6",
"copy-to-clipboard": "^3.3.3",
2018-04-03 22:52:01 +02:00
"currency-formatter": "^1.4.2",
"debounce-stream": "^2.0.0",
"deep-freeze-strict": "1.1.1",
2020-02-25 13:42:09 +01:00
"end-of-stream": "^1.4.4",
2018-07-27 02:24:39 +02:00
"eth-ens-namehash": "^2.0.8",
2023-02-17 06:45:09 +01:00
"eth-json-rpc-filters": "^6.0.0",
"eth-lattice-keyring": "^0.12.4",
2021-11-08 23:00:35 +01:00
"eth-method-registry": "^2.0.0",
2017-06-15 06:42:29 +02:00
"eth-query": "^2.1.2",
2021-01-21 07:06:41 +01:00
"eth-rpc-errors": "^4.0.2",
2020-11-09 17:57:18 +01:00
"eth-sig-util": "^3.0.0",
"ethereum-ens-network-map": "^1.0.2",
2017-09-29 02:39:53 +02:00
"ethereumjs-abi": "^0.6.4",
"ethereumjs-util": "^7.0.10",
"ethjs": "^0.4.0",
"ethjs-contract": "^0.2.3",
"ethjs-query": "^0.3.4",
"extension-port-stream": "^2.1.1",
2023-01-05 12:41:59 +01:00
"fast-json-patch": "^3.1.1",
"fuse.js": "^3.2.0",
"globalthis": "^1.0.1",
"human-standard-token-abi": "^2.0.0",
"immer": "^9.0.6",
2022-10-11 17:04:32 +02:00
"is-retry-allowed": "^2.2.0",
"jest-junit": "^14.0.1",
2020-12-02 20:41:24 +01:00
"json-rpc-engine": "^6.1.0",
"json-rpc-middleware-stream": "^4.2.1",
Version v9.5.0 RC (#10944) * add trezor HD path for ledger wallets (#10616) Co-authored-by: Barry Gitarts <bgitarts@gmail.com> * Replace logic for eth swap token in fetchQuotesAndSetQuoteState with getSwapsEthToken call (#10624) * Ensure permission log will only store JSON-able data (#10524) * remove transactionCategory in favor of more types (#10615) * remove transactionCategory in favor of more types * remove reference to STANDARD in stubs * Removing double click bug from delete custom network modal (#10628) Fixes MetaMask/metamask-extension#10626 * Hide zero balance tokens at useTokenTracker layer (#10630) * Setting balance to 0x0 when the original value is undefined (#10634) * fix: speedup cancellation (#10579) fixes #7305 * no more node:console (#10640) * prefer chainId over networkId in most cases (#10594) * Move swaps constants to the shared constants directory (#10614) * Position the 3dot menu in the same spot on asset screen and home screen (#10642) * Ensure swaps detail height doesn't create jump in vertical height (#10644) * Fix: ETH 'token' now only appears once in the swaps to and from dropdowns. (#10650) * Prevent network menu highlighting (#10643) * Allow TextField to receive min and max attributes (#10656) * colocate tests in flat structure (#10655) * Fixing migration script generation paths (#10664) * Improve specificity of `test:unit:lax` npm script (#10661) The unit test npm script `test:unit:lax` is now more specific about which tests files to exclude. An `--ignore` CLI option is used to specify the files to ignore, rather than using the braces glob syntax to ignore them from the target glob itself. This makes the option easier to update going forward as we move more tests into the "strict" group, because the options are exactly the same between the two scripts. It also ensures we don't accidentally exclude other subdirectories that happen to also be named `permissions`. In trying to implement this, I stumbled at first because mocha expects the ignore pattern to be a relative path if the target is a relative path (i.e. they need to both start with `./` or neither). The script `test:unit:strict` has been updated to use a relative target pattern for consistency. * Swaps support for local testnet (#10658) * Swaps support for local testnet * Create util method for comparison of token addresses/symbols to default swaps token * Get chainId from txMeta in _trackSwapsMetrics of transaction controller * Add comment to document purpose of getTransactionGroupRecipientAddressFilter * Use isSwapsDefaultTokenSymbol in place of repeated defaultTokenSymbol comparisons in build-quote.js * fix: replace dnode background with JSON-RPC (#10627) fixes #10090 * Don't render faucet row in deposit modal for custom chains (#10674) Fixes MetaMask/metamask-extension#10038 * Change 'Send ETH' title to 'Send' (#10651) * Fixing incorrectly typed token decimal attribute (#10666) * refactor incoming tx controller (#10639) * make migration more safe (#10689) * Adding default properties to NetworkForm (#10682) Fixes MetaMask/metamask-extension#10681 * deps - remove "remotedev-server" (#10687) * deps - remove remotedev-server * Remove stale references from allow-scripts config Any packages that are no longer in the dependency tree have been removed from the `allow-scripts` config. Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Excluding sourcemaps comment in production builds (#10695) * Excluding sourcemaps comment in production builds Fixes MetaMask/metamask-extension#7077 * Fix source map explorer script The source map explorer script now re-adds the source map comment to each file to ensure the source map visualization still works. Each module with a sourcemap is copied to a temporary directory along with the module it corresponds to, and from there it's passed into `source-map-explorer`. This should ensure the resulting visualization matches what it was before. Everything has been moved inside of functions to generally improve readability, and to allow the use of local variables. Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Delete setupFetchDebugging.js (#10636) * Delete setupFetchDebugging.js * remove fetch-debugging (now handled corrently by sentry) * resolve issue with missing template error (#10692) * resolve issue with missing template error * also apply filtering to confirmation page * rename variable * Add MetaMask to list of BIP44 HD path examples (#10703) The "BIP44 Standard" HD path option in the Ledger connect flow listed only Trezor as an example. It seemed appropriate to include MetaMask as well, since we use the same path. This helps users who have imported their MetaMask seed phrase onto a Ledger device to discover this option. * Removing hard references to 12 word seed phrases in copy (#10704) Adding translation entry for "Wallet Seed" Fixed label padding issue by adding missing CSS rule * rule out empty string for symbol (#10712) * fix: remove unused `metamask.rpcUrl` from redux state + fix tests to reflect that (#10714) * Fix 10706 - Prevent autocomplete from add token input (#10700) * Fix mismatchedChain typo in custom network approval screen (#10723) * Fix 10562 - Hide the suggested token pane when not on Mainnet or test network (#10702) * Update @metamask/controllers to v6.2.1 (#10701) * Additional swaps network support (#10721) * Add swaps support for bnc chain * Use single default token address in shared/constants/swaps * ci - cache deps before patch-package (#10735) * ci - cache deps before patch-package * ci - bump dep cache number (cache break) * build - refactor build system for easier configuration (#10718) * build - refactor build system for easier configuration of before and after bundle * build - fix dependenciesToBundle option * build - fix bify external options and other config * build - refactor for cleanliness * build - fix minify argument * build - fix sourcemaps setup * scripts - refactor setupBundlerDefaults in anticipation of factor bundles * build - scripts - remove unused pipeline label * build - scripts - make filepath entry optional * build - scripts - rename filepath and filename options to entryFilepath and destFilepath * Update development/build/scripts.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * security - update SES lockdown (#10663) * update ses * build - reference ses directly * deps - unify regenerator-runtime versions on 0.13.7 * patches - apply regenerator-runtime ses compat patch\nhttps://github.com/facebook/regenerator/pull/411 * patches - patch regenerator-runtime for latest ses fix * reduc patch, new lockdown severe override taming * updated redux patch * update redux patch for production * ignore lockdown in lint * deps - bump patch-package just in case * trailing comma * remove ses as dep * fix path for frozen promise * remove js extension in lockdown require * Revert "ignore lockdown in lint" This reverts commit 8cefdc94dd25d7781bb09eed8af36441397676da. * Revert "build - reference ses directly" This reverts commit 30371a377dcdd781c1bf9abe55e9c8ae34da26b5. * deps - update ses * Revert "fix path for frozen promise" This reverts commit 966e4c60921a25befe8ca8dea58313cc25852f72. Co-authored-by: kumavis <aaron@kumavis.me> * Allow 11 characters in symbol for RPC (#10670) * Add error in RPC for zero length symbols * Increase RPC symbol length allowed to 11 * Add RPC tests for new symbol length checks * eth-block-tracker@5.0.1 (#10737) * Ensure swaps gas prices are fetched from the correct chain specific endpoint (#10744) * Ensure swaps gas prices are fetched from the correct chain specific endpoint * Just rely on fetchWithCache to cache swaps gas prices, instead of directly using storage in getSwapsPriceEstimatesLastRetrieved * Empty commit * update @metamask/etherscan-link to v2.0.0 (#10747) * Use correct block explorer name and link in swaps when on custom network (#10743) * Use correct block explorer name and link in swaps when on custom network. * Fix up custom etherscan link code in build-quote.js * Use blockExplorerUrl hostname instead of 'blockExplorerBaseUrl' * Use correct etherscan-link method for token links in build-quote * Create correct token link in build-quote for mainnet AND custom networks * Block explorer url improvements in awaiting-swap.js and build-quote.js * Use swapVerifyTokenExplanation message with substitutable block explorer for all applicable locales * Ensure that block explorer links are not shown in awaiting-swap if no url is available * Add New Zealand Dollar to currency options (#10746) * Ensure that the correct default currency symbols are used for fees on the view quote screen (#10753) * Fix 10517 - Prevent tokens without addresses from being added to token list (#10593) * Updating y18n and netmask to resolve dependency issues (#10765) netmask@1.0.6 -> 2.0.1, y18n@3.2.1 -> 3.2.2, y18n@4.0.0 -> 4.0.1 * Refactor Tx State Manager (#10672) Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Ensure that the approval fee in the swaps custom gas modal is in network specific currency (#10763) * Ensure that priceSlippage fiat amounts are always shown in view-quote.js (#10762) * Use network specific swaps contract address when checking swap contract token approval (#10774) * Build - refactor background process to use html (#10769) * build - declare background as html * build - fill in empty file when a missing file is expected * lint - fix * Update development/build/manifest.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Update development/build/manifest.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * build - fix use of empty file to replace unused js files (#10780) * cache lint results for faster repeat execution (#10773) * eslint perf improvement (#10775) * Improve detection of task process exit (#10776) Our build script waits for the `close` event to determine whether the task has exited. The `exit` event is a better representation of this, because if a stream is shared between multiple processes, the process may exit without the `close` event being emitted. We aren't sharing streams between processes, so this edge case doesn't apply to us. This just seemed like a more suitable event to listen to, since we care about the process exiting not the stream ending. See this description of the `close` event from the Node.js documentation [1]: >The `'close'` event is emitted when the stdio streams of a child >process have been closed. This is distinct from the `'exit'` event, >since multiple processes might share the same stdio streams. And see this description of the `exit` event: >The `'exit'` event is emitted after the child process ends. [1]: https://nodejs.org/docs/latest-v14.x/api/child_process.html#child_process_event_exit * Rewrite changelog script from Bash to JavaScript (#10782) The `auto-changelog` script has been rewritten from Bash to JavaScript. Functionally it should behave identically. * Refactoring ethereum-on.spec.js to use fixtures (#10778) * Remove useless negation (#10787) !contentComponent always evaluates to true * Remove date from changelog release header (#10790) New changelog release headers now omit the date. These headers are added automatically when a new release branch is created, and that rarely ends up being the actual date of the release, so these dates have all been inaccurate anyway. The date will be re-added to the changelog later as part of a new script, after a release has been published. * Remove script for creating master sync PR (#10791) The script responsible for creating the "Sync `master` with `develop`" PR has been removed. We will soon be eliminating the need for a `master` branch altogether, so we don't need this anymore. Also, this script hasn't been running correctly in a long time. We've been creating this PR manually. * Add changelog entries under release candidate header (#10784) Instead of always placing new changelog entries under the "Current Develop Branch" header, the changelog script now places them under the header for the current release if that release has not yet been tagged. This eliminates one manual step from the release process. Relates to #10752 * Prevent duplicate changelog entries (#10786) The changelog update script now prevents duplicate entries from being added. Specifically, it will ensure that if a PR has been referenced already in an entry, it will not add it again. This should prevent it from adding duplicate entries for changes that were cherry-picked into hotfix releases. Note that this duplication prevention only works for entries containing a PR number. We don't have any way to prevent duplicate entries yet in cases where we don't know the associated PR. We will be preventing this possibility entirely pretty soon in some upcoming release automation changes though, so I'm not concerned about this omission. * Set the BSC_CONTRACT_ADDRESS to lowercase (#10800) * only applies rules to the appropriate files (#10788) * upgrade eslint deps (#10789) * Ensure correct primary currency image is displayed on home screen and token list (#10777) * Add release header when updating changelog (#10794) The changelog update script now adds a release header if it doesn't find one already that matches the current release candidate version. * remove node-sass dependency (#10797) * Add support for locators into driver abstraction (#10802) * Update changelog headers and fix dates (#10805) The changelog release header format has been updated to match the "keep a changelog" [1] format. Each header is now the bracketed version number followed by a dash, then the release date in ISO-8601 format. The release dates in each header were also updated to match the date of the corresponding GitHub Release [2]. Many of these dates were incorrect because they were set on the day we created the release candidate, rather than on the day of release. Any changelog release entries without a corresponding GitHub release was left with the date already specified. The three oldest release headers were missing dates. For the first two, I used the date of the version bump commit. For the third, I removed it since no changes were listed anyway, and it represented a range of releases rather than a single one. The `auto-changelog.js` script has been updated to account for this new format as well. [1]: https://keepachangelog.com/en/1.0.0/ [2]: https://github.com/MetaMask/metamask-extension/releases * Update the changelog when creating an RC (#10795) The changelog will now be automatically updated when a release branch is created. A new release header along with changelog entries for any new commits will be added. Note that this changelog will still need to be manually cleaned up, but it's one less manual step at least. The old Bash script for adding a new release header to the changelog has been removed, as that functionality is now built into the changelog update script. A new script has been added to commit any changes made to the manifest and changelog. This step used to happen at the end of the bump manifest version script, but now the changelog update relies upon the manifest version bump happening first, so it needed to be re-ordered. The changes should only be committed on the first run of the branch, as it's contingent upon the manifest changing (due to the version bump). Further changelog updates won't trigger new automatic commits. * Refactoring address-book.spec.js to use fixtures (#10804) * Refactoring send-edit.spec.js to use fixtures (#10792) * Fix _getPermittedAccounts type safety (#10819) * Removing unnecessary params from withFixtures function call. (#10831) * Add links to release headers (#10808) Each release header now includes a link to the range of commits included with that release. These links are at the end of the document, in accordance with the "keep a changelog" [1] format. For the purpose of this changelog, the "previous release" is the most recent release mentioned in the changelogs. The diffs ignore any releases that were omitted from the changelog. This is mainly an issue with older releases, so it seemed acceptable. All releases have been documented for a couple of years now, and will be going forward as well. The name of the "Current Develop Branch" section was changed to "Unreleased" to confirm with "keep a changelog". The `auto-changelog.js` script has been updated to update/add these links whenever adding a new release header as well. [1]: https://keepachangelog.com/en/1.0.0/ * Refactoring permissions.spec.js to use fixtures (#10829) * Add validation for the `fee` property from the `/trades` API response (#10836) * Refactoring signature-request.spec.js to use fixtures (#10820) * use locator abstraction in tests folder (#10833) * Move BSC chain ID, rename some BSC-related vars (#10807) * Add categories to each changelog release (#10837) Each changelog release now has category headers. The standard "keep a changelog" [1] categories are used, along with the addition of "Uncategorized" for any changes that have not yet been categorized. The changelog script has been updated to add this "Uncategorized" header if it isn't already present, and to place any new commits under this header. The changelog has been updated to property categorize each change in recent releases, and to place changes in older releases under the header "Uncategorized". [1]: https://keepachangelog.com/en/1.0.0/ * Remove unused CI script (#10840) This script has not been used since #10795. It is now gone. * Add `--rc` flag to changelog script (#10839) The changelog script now accepts an `--rc` flag to tell it whether to add new changes to `Unreleased` or to the header for the current version. Previously this was inferred from whether the current version matched the most recent tag. However this method only works for the first update. Using a flag simplifies this logic, and makes it possible to manually re-run this for further updates to a release candidate. * Add `--help` flag to changelog script (#10846) The changelog script now accepts a `--help` flag, which prints a help text explaining how the script works and what each flag does. * add abstraction for waitForSelector (#10844) * Adds jest dependency (#10845) * Add Jest * Refactor changelog parsing and generation (#10847) The `auto-changelog.js` script has been refactoring into various different modules. This was done in preparation for migrating this to a separate repository, where it can be used in our libraries as well. Functionally this should act _mostly_ the same way, but there have been some changes. It was difficult to make this a pure refactor because of the strategy used to validate the changelog and ensure each addition remained valid. Instead of being updated in-place, the changelog is now parsed upfront and stored as a "Changelog" instance, which is a new class that was written to allow only valid changes. The new changelog is then stringified and completely overwrites the old one. The parsing had to be much more strict, as any unanticipated content would otherwise be erased unintentionally. This script now also normalizes the formatting of the changelog (though the individual change descriptions are still unformatted). The changelog stringification now accommodates non-linear releases as well. For example, you can now release v1.0.1 *after* v2.0.0, and it will be listed in chronological order while also correctly constructing the `compare` URLs for each release. * Increase default slippage from 2% to 3%, show Advanced Options by default (#10842) * Increase default slippage from 2% to 3%, show Advanced Options by default * Disable opening / closing of Advanced Options on the Swap page * Pre-select previously used slippage value when going back to the Swap page * Fix lint issues * Use a callback for setting up an initial customValue * Migrate unreleased changes in changelog (#10853) When updating the changelog for a release candidate, any unreleased changes are now migrated to the release header. Generally we don't make a habit of adding changes to the changelog prior to creating a release candidate, but if any are there we certainly don't want them duplicated. * @metamask/eslint-config*@6.0.0 (#10858) * @metamask/eslint-config*@6.0.0 * Minor eslintrc reorg * Refactoring threebox.spec.js to use fixtures (#10849) * Adjust renderWithProvider to accommodate redux-less components (#10857) * Jest config (#10855) * Setup jest config * Adjust test for jest. * Adjust lint config * Omit swaps ui folder for unit testing * Omit swaps from test:unit:lax * Add jest.config.js to script files * Restore mocks rather than clearing them. * Update jest config and adjust lint to include subdirs * Convert view-quote-price-difference test to jest * Add jest ci and ci coverage scripts. Add jest unit test to general test command * Add test coverage to ci * Use --ignore flag * Fixup * Add @metamask/eslint-config-jest * Update .eslintrc.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Adds jest-coverage/ Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Add jest-coverage/ to prettierignore (#10865) * Add jest coverage (#10868) * Add jest coverage This will add coverage for any tests ran in jest under the `test:coverage:jest` command, which is currently being used in CI. I set the values to the current test coverage in `ui/app/pages/swaps`. * Lint * Fix crash when adding new changelog release header (#10870) The `auto-changelog.js` script crashes when trying to add a new release header. This bug was introduced in #10847. The cause was a simple misnamed parameter. * Change caching for Swaps APIs from 1 hour to 5 minutes (#10871) * Change caching for the /tokens API from 1 hour to 5 minutes * Use 5 minutes caching for /topAssets and /aggregatorMetadata APIs as well * add key literals to driver (#10854) * Quote globs in prettier scripts (#10867) * use waitForSelector instead of until (#10852) * complete abstraction of until method * response to feedback * Adding recovery phrase video to onboarding process (#10717) * Adding recovery phrase video to onboarding process Adding english subtitles * Support textAlign in Box, converting sidebar to Box * Reduce calls of the `/featureFlag` API (#10859) * Remove periodic calls to the /featureFlag API * Always show the Swap button on the main page * Check if the Swaps feature is enabled, show loading animation while waiting * Reuse an existing useEffect call * Use ‘isFeatureFlagLoaded’ in React’s state, resolve lint issues * Add a watch mode for Jest testing * Add unit tests for Swaps: fetchSwapsLiveness, add /ducks/swaps into Jest testing * Remove Swaps Jest tests from Mocha’s ESLint rules * Ignore Swaps Jest tests while running Mocha, update paths * Increase test coverage to the current max * Fix ESLint issues for Swaps * Enable the Swaps feature by default and after state reset, remove loading screen before seeing Swaps * Update Jest config, fix tests * Update Jest coverage threshold to the current maximum * Update ESLint rule in jest.config.js * Disable the “Review Swap” button if the feature flag hasn’t loaded yet * Update jest threshold * Fix 10036 - Prevent odd localStorage migration error in Firefox (#10884) * Add jest watch mode script (#10869) * Refactoring metamask-responsive-ui.spec.js to use fixtures (#10866) * Handling infura blockage (#10883) * Handling infura blockage * Adding blockage home notification * Updating copy, adding temporary notification dismissal * Addressing review feedback * Using eth_blockNumber method to check Infura availability * Handling network changes in availability check * Use jest to run ui/**/*.test.js (#10885) * upgrade ethereumjs util (#10886) * Swaps: Show a network name dynamically in a tooltip (#10882) * Swaps: Show a network name dynamically in a tooltip * Replace “Ethereum” with “$1”, change “Test” to “Testnet” * Replace 이더리움 with $1 * Translate network names, use ‘Ethereum’ by default if a translation is not available yet * Reorder messages to resolve ESLint issues * Add a snapshot test for the FeeCard component, increase Jest threshold * Enable snapshot testing into external .snap files in ESLint * Add the “networkNameEthereum” key in ko/messages.json, remove default “Ethereum” value * Throw an error if chain ID is not supported by the Swaps feature * Use string literals when calling the `t` fn, * Adding option to set Custom Nonce to Confirm Approve Page (#10595) * Dep Upgrades for Lavamoat Patches (#10902) * dep upgrades * apply more patches * Dep upgrades and patches (#10903) * apply patches * lavamoat dep upgrades * remove lavamoat browserify * Increase Jest unit test coverage for the Swaps feature to ~25% (#10900) * Swaps: Show a network name dynamically in a tooltip * Replace “Ethereum” with “$1”, change “Test” to “Testnet” * Replace 이더리움 with $1 * Translate network names, use ‘Ethereum’ by default if a translation is not available yet * Reorder messages to resolve ESLint issues * Add a snapshot test for the FeeCard component, increase Jest threshold * Enable snapshot testing into external .snap files in ESLint * Add the “networkNameEthereum” key in ko/messages.json, remove default “Ethereum” value * Throw an error if chain ID is not supported by the Swaps feature * Use string literals when calling the `t` fn, * Watch Jest tests silently (no React warnings in terminal, only errors) * Add @testing-library/jest-dom, import it before running Jest tests * Add snapshot testing of Swaps’ React components for happy paths, increase minimum threshold for Jest * Add the test/jest folder for Jest setup and shared functions, use it in Swaps Jest tests * Fix ESLint issues, update linting config * Enable ESLint for .snap files (Jest snapshots), throw an error if a snapshot is bigger than 50 lines * Don’t run lint:fix for .snap files * Move `createProps` outside of `describe` blocks, move store creation inside tests * Use translations instead of keys, update a rendering function to load translations * Make sure all Jest snapshots are shorter than 50 lines (default limit) * Add / update props for Swaps tests * Fix React warnings when running tests for Swaps * Bump @metamask/contract-metadata from 1.23.0 to 1.25.0 (#10899) Bumps [@metamask/contract-metadata](https://github.com/MetaMask/contract-metadata) from 1.23.0 to 1.25.0. - [Release notes](https://github.com/MetaMask/contract-metadata/releases) - [Commits](https://github.com/MetaMask/contract-metadata/compare/v1.23.0...v1.25.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Refactoring from-import-ui.spec.js to use fixtures (#10907) * Fix 10458 - Understand where to get support (#10895) * Add contract address validation for token swaps (#10912) * Fixing ENS input entry in send flow (#10923) * Fixing ENS input entry in send flow Fixes MetaMask/metamask-extension#10691 * removed unnecessary apostrophe * Refactoring incremental-security.spec.js to use fixtures (#10917) * use one segment instance (#10915) * Implement Ledger Live bridge (#10293) * add view account-details menu item to token-options menu (#10932) * add view account-details menu item to token-options menu * add onViewAccountDetails propType * Fix 10609 - Prevent overflow of confirmation page hostname (#10935) * upgrade eth-keyring-controller (#10933) * [Fix] 10365 My Accounts Removal (#10680) * pushing my-accounts removal * removed CONTACT_MY_ACCOUNTS_ROUTE * removed CONTACT_MY_ACCOUNTS_VIEW_ROUTE * removing CONTACT_MY_ACCOUNTS_EDIT_ROUTE * removing CONTACT_MY_ACCOUNTS_EDIT_ROUTE * removed showingMyAccounts dead code * removed more dead code related to isMyAccountsPage * removing more dead code * fixed linting error(s) * removing my-accounts component/folder * added empty contact screen ui * styled empty contact page ui * fixed linting, removed add contacts button, and fixed errors * localized text and centered No Contacts * pushing localized verification and fixed e2e test * added listRoute redirect * added listroute and fixed linting error * Increase Jest unit test coverage for the Swaps feature to ~43% (#10934) * add hamburger menu to eth page (#10938) * add hamburger menu to eth page * change token-options to asset-options, use more direct selector for user address fetch * use token custom icons where possible (#10939) * Whats new popup (#10583) * Add 'What's New' notification popup * Move selectors from shared/notifications into ui/ directory * Use keys for localized message in whats new notifications objects, to ensure notifications will be translated. * Remove unused swaps intro popup locale messages * Fix keys of whats new notification locales * Remove notifications messages and descriptions from comment in shared/notifications * Move notifcationActionFunctions to shared/notifications and make it stateless * Get notification data from constants instead of state in whats-new-popup * Code cleanup * Fix build quote reference to swapsEthToken, broken during rebase * Rename notificationFilters to notificationToExclude to clarify its purpose * Documentation for getSortedNotificationsToShow * Move notification action functions from shared/ to whats-new-popup.js * Stop setting swapsWelcomeMessageHasBeenShown to state in app-state controller * Update e2e tests for whats new popup changes * Updating migration files * Addressing feedback part 1 * Addressing feedback part 2 * Remove unnecessary div in whats-new-popup * Change getNotificationsToExclude to getNotificationsToInclude for use in the getSortedNotificationsToShow selector * Delete intro-popup directory and test files * Lint fix * Add notifiction state to address-entry fixture * Use two separate functions for rendering first and subsequent notifications in the whats-new-popup * Ensure that string literals are passed to t for whats new popup text * Update import-ui fixtures to include notificaiton controller state * Remove unnecessary, accidental change confirm-approve * Remove swaps notification in favour of mobile swaps as first notifcation and TBD 3rd notification * Update whats-new-popup to use intersection observer api to detect if notification has been seen * Add notifications to send-edit and threebox e2e test fixtures * Update ui/app/selectors/selectors.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Update ui/app/selectors/selectors.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Clean up locale code for whats-new-popup notifications * Disconnect observers in whats-new-popup when their callback is first called * Add test case for migration 58 for when the AppStateController does not exist * Rename popover components containerRef to popoverWrapRef * Fix messages.json * Update notification messages and images * Rename popoverWrapRef -> popoverRef in whats-new-popup and popover.component * Only create one observer, and only after images have loaded, in whats-new-popup * Set width and height on whats-new-popup image, instead of setting state on img load * Update ui/app/components/app/whats-new-popup/whats-new-popup.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Code clean up in whats new popup re: notification rendering and action functions * Code cleanup in render notification functions of whats-new-popup * Update ui/app/components/app/whats-new-popup/whats-new-popup.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * lint fix * Update and localize notification dates * Clean up date code in shred/notifications/index.js Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Revert "Implement Ledger Live bridge (#10293)" This reverts commit 15b596ad15f2d569255c39e5e7babc8b7ab700ca. * Version v9.5.0 * Update changelog for v9.5.0 * yarn allow-scripts and yarn lavamoat:auto for Version-v9.5.0 branch * Anchor the Need Help text to the bottom of the expanded page (#10955) * fix transaction sync logic (#10954) * Add backwards compatibility for ETH <-> WETH contract address validation (#10962) * Whats new popup design fixes (#10964) * Remove padding on QR code image * Allow the qr code to be below the description in the whats new popup * Fix size and position of QR code in whats new notification * Add right caret to action links in whats new popup * Clean up placeImageBelowDescription logic * Fix display of whats-new-popup image * Improve spacing and sizing of whats new popup in both full screen and popup view * refactor * Ensure method of adding contact when contacts exist (#10963) * Fixing alignment issue with bottom notification (#10979) * Revert "Adding recovery phrase video to onboarding process (#10717)" This reverts commit 9e918b602655e0e4620ab19a3959a8fc08ec0f47. * Removing recovery video entry from changelog * Remove tests that are only needed for the commit reverted in 68c5defc * Fix dependency vulnerability by upgrading xmlhttprequest-ssl via yarn.lock (#10990) Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Barry Gitarts <bgitarts@gmail.com> Co-authored-by: Dan J Miller <danjm.com@gmail.com> Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com> Co-authored-by: Brad Decker <git@braddecker.dev> Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: David Walsh <davidwalsh83@gmail.com> Co-authored-by: Niranjana Binoy <43930900+NiranjanaBinoy@users.noreply.github.com> Co-authored-by: Shane <jonas.shane@gmail.com> Co-authored-by: gitpurva <47534619+gitpurva@users.noreply.github.com> Co-authored-by: kumavis <kumavis@users.noreply.github.com> Co-authored-by: Etienne Dusseault <etienne.dusseault@gmail.com> Co-authored-by: kumavis <aaron@kumavis.me> Co-authored-by: Grant Bakker <grant@bakker.pw> Co-authored-by: Michael Standen <screaminghawk@gmail.com> Co-authored-by: Muhammet Kara <mrkara@users.noreply.github.com> Co-authored-by: Daniel <80175477+dan437@users.noreply.github.com> Co-authored-by: Thomas Huang <tmashuang@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Thomas <thomas.b.huang@gmail.com> Co-authored-by: Alex Donesky <alex.donesky@consensys.net> Co-authored-by: Austin Akers <austin.akers5@gmail.com> Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
2021-05-05 20:08:59 +02:00
"labeled-stream-splicer": "^2.0.2",
"localforage": "^1.9.0",
"lodash": "^4.17.21",
"loglevel": "^1.8.1",
"luxon": "^3.2.1",
Connect distinct accounts per site (#7004) * add PermissionsController remove provider approval controller integrate rpc-cap create PermissionsController move provider approval functionality to permissions controller add permissions approval ui, settings page add permissions activity and history move some functionality to metamask-inpage-provider rename siteMetadata -> domainMetadata add accountsChange notification to inpage provider move functionality to inpage provider update inpage provider Remove 'Connections' settings page (#7369) add hooks for exposing accounts in settings rename unused messages in non-English locales Add external extension id to metadata (#7396) update inpage provider, rpc-cap add eth_requestAccounts handling to background prevent notifying connections if extension is locked update inpage provider Fix lint errors add migration review fixes transaction controller review updates removed unused messages * Login Per Site UI (#7368) * LoginPerSite original UI changes to keep * First commit * Get necessary connected tab info for redirect and icon display for permissioned sites * Fix up designs and add missing features * Some lint fixes * More lint fixes * Ensures the tx controller + tx-state-manager orders transactions in the order they are received * Code cleanup for LoginPerSite-ui * Update e2e tests to use new connection flow * Fix display of connect screen and app header after login when connect request present * Update metamask-responsive-ui.spec for new item in accounts dropdown * Fix approve container by replacing approvedOrigins with domainMetaData * Adds test/e2e/permissions.spec.js * Correctly handle cancellation of a permissions request * Redirect to home after disconnecting all sites / cancelling all permissions * Fix display of site icons in menu * Fix height of permissions page container * Remove unused locale messages * Set default values for openExternalTabs and tabIdOrigins in account-menu.container * More code cleanup for LoginPerSite-ui * Use extensions api to close tab in permissions-connect * Remove unnecessary change in domIsReady() in contentscript * Remove unnecessary private function markers and class methods (for background tab info) in metamask-controller. * Adds getOriginOfCurrentTab selector * Adds IconWithFallback component and substitutes for appropriate cases * Add and utilize font mixins * Remove unused method in disconnect-all.container.js * Simplify buttonSizeLarge code in page-container-footer.component.js * Add and utilize getAccountsWithLabels selector * Remove console.log in ui/app/store/actions.js * Change last connected time format to yyyy-M-d * Fix css associated with IconWithFallback change * Ensure tracked openNonMetamaskTabsIDs are correctly set to inactive on tab changes * Code cleanup for LoginPerSite-ui * Use reusable function for modifying openNonMetamaskTabsIDs in background.js * Enables automatic switching to connected account when connected domain is open * Prevent exploit of tabIdOriginMap in background.js * Remove unneeded code from contentscript.js * Simplify current tab origin and window opener logic using remotePort listener tabs.queryTabs * Design and styling fixes for LoginPerSite-ui * Fix permissionHistory and permission logging for eth_requestAccounts and eth_accounts * Front end changes to support display of lastConnected time in connected and permissions screens * Fix lint errors * Refactor structure of permissionsHistory * Fix default values and object modifications for domain and permissionsHistory related data * Fix connecting to new accounts from modal * Replace retweet.svg with connect-white.svg * Fix signature-request.spec * Update metamask-inpage-provider version * Fix permissions e2e tests * Remove unneeded delay from test/e2e/signature-request.spec.js * Add delay before attempting to retrieve network id in dapp in ethereum-on=.spec * Use requestAccountTabIds strategy for determining tab id that opened a given window * Improve default values for permissions requests * Add some message descriptions to app/_locales/en/messages.json * Code clean up in permission controller * Stopped deep cloning object in mapObjectValues * Bump metamask-inpage-provider version * Add missing description in app/_locales/en/messages.json * Return promises from queryTabs and switchToTab of extension.js * Remove unused getAllPermissions function * Use default props in icon-with-fallback.component.js * Stop passing to permissions controller * Delete no longer used clear-approved-origins modal code * Remove duplicate imports in ui/app/components/app/index.scss * Use URL instead of regex in getOriginFromUrl() * Add runtime error checking to platform, promise based extension.tab methods * Support permission requests from external extensions * Improve font size and colour of the domain origin on the permission confirmation screen * Add support for toggling permissions * Ensure getRenderablePermissionsDomains only returns domains with exposedAccount caveat permissions * Remove unused code from LoginPerSite-ui branch * Ensure modal closes on Enter press for new-account-modal.component.js * Lint fix * fixup! Login Per Site UI (#7368) * Some code cleanup for LoginPerSite * Adds UX for connecting to dapps via the connected sites screen (#7593) * Adds UX for connecting to dapps via the connected sites screen * Use openMetaMaskTabIds from background.js to determine if current active tab is MetaMask * Delete unused permissions controller methods * Fixes two small bugs in the LoginPerSite ui (#7595) * Restore `providerRequest` message translations (#7600) This message was removed, but it was replaced with a very similar message called `likeToConnect`. The only difference is that the new message has "MetaMask" in it. Preserving these messages without "MetaMask" is probably better than deleting them, so these messages have all been restored and renamed to `likeToConnect`. * Login per site no sitemetadata fix (#7610) * Support connected sites for which we have no site metadata. * Change property containing subtitle info often populated by origin to a more accurate of purpose name * Lint fix * Improve disconnection modal messages (#7612) * Improve disconnectAccountModalDescription and disconnectAllModalDescription messages * Update disconnectAccountModalDescription app/_locales/en/messages.json Co-Authored-By: Mark Stacey <markjstacey@gmail.com> * Improve disconnectAccount modal message clarity * Adds cancel button to the account selection screen of the permissions request flow (#7613) * Fix eth_accounts permission language & selectability (#7614) * fix eth_accounts language & selectability * fix MetaMask capitalization in all messages * Close sidebar when opening connected sites (#7611) The 'Connected Sites' button in the accounts details now closes the sidebar, if it is open. This was accomplished by pulling the click handler for that button up to the wallet view component, where another button already followed a similar pattern of closing the sidebar. It seemed confusing to me that one handler was in the `AccountsDetails` container component, and one was handed down from above, so I added PropTypes to the container component. I'm not sure that the WalletView component is the best place for this logic, but I've put it there for now to be consistent with the add token button. * Reject permissions request upon tab close (#7618) Permissions requests are now rejected when the page is closed. This only applies to the full-screen view, as that is the view permission requests should be handled in. The case where the user deals with the request through a different view is handled in #7617 * Handle tab update failure (#7619) `extension.tabs.update` can sometimes fail if the user interacts with the tabs directly around the same time. The redirect flow has been updated to ensure that the permissions tab is still closed in that case. The user is on their own to find the dapp tab again in that case. * Login per site tab popup fixes (#7617) * Handle redirect in response to state update in permissions-connect * Ensure origin is available to permissions-connect subcomponents during redirect * Hide app bar whenever on redirect route * Improvements to handling of redirects in permissions-connect * Ensure permission request id change handling only happens when page is not null * Lint fix * Decouple confirm transaction screen from the selected address (#7622) * Avoid race condtion that could prevent contextual account switching (#7623) There was a race condition in the logic responsible for switching the selected account based upon the active tab. It was asynchronously querying the active tab, then assuming it had been retrieved later. The active tab info itself was already in the redux store in another spot, one that is guaranteed to be set before the UI renders. The race condition was avoided by deleting the duplicate state, and using the other active tab state. * Only redirect back to dapp if current tab is active (#7621) The "redirect back to dapp" behaviour can be disruptive when the permissions connect tab is not active. The purpose of the redirect was to maintain context between the dapp and the permissions request, but if the user has already moved to another tab, that no longer applies. * Fix JSX style lint errors * Remove unused state
2019-12-03 18:35:56 +01:00
"nanoid": "^2.1.6",
"nonce-tracker": "^1.0.0",
"obj-multiplex": "^1.0.0",
"pify": "^5.0.0",
"promise-to-callback": "^1.0.0",
2018-03-27 09:20:35 +02:00
"prop-types": "^15.6.1",
2018-03-09 20:51:03 +01:00
"pump": "^3.0.0",
"punycode": "^2.1.1",
2019-02-25 20:10:13 +01:00
"qrcode-generator": "1.4.1",
"qrcode.react": "^1.0.1",
"react": "^16.12.0",
"react-dom": "^16.12.0",
2023-05-09 23:33:29 +02:00
"react-focus-lock": "^2.9.4",
"react-idle-timer": "^4.2.5",
"react-inspector": "^6.0.2",
"react-markdown": "^6.0.3",
Improve account options menu (#8607) The account options menu is now much faster, and it correctly closes when 'Switch account' is selected. A static width had to be set on the menu so that it could be positioned reliably. Without this width set, it was rendered as a different size before positioning than after, which resulted in it being positioned incorrectly. A `z-index` had to be added (equal to the `z-index` used by the popover component) to ensure it wasn't rendered beneath the popover. The menu is automatically positioned relative to the account options button, appearing below the button by default but above it instead if there isn't room below. It is positioned to be inside the bounds of the popover as well. The account options button is now a `<button>` rather than a `<i>`. This required a few additional style rules to overrule the default button styles. Additionally the size was increased so that it matches the designs more closely. The callbacks for connecting, disconnecting, and switching accounts have been updated to use state and props to determine the correct address to use, rather than being bound to the correct address parameter in the render function. This means we aren't creating a new function upon each render anymore. The `showAccountOptions` method still needs to be bound once per account, but this was switched to use more readable syntax (`.bind`, instead of the double arrow function). `react-popper` and `@popperjs/core` were both added as dependencies. These should be used for any UI requiring relative positioning (e.g. tooltips, menus, etc.). Older versions of these libraries are already in our codebase as transitive dependencies of the tooltip library we're using.
2020-05-18 19:51:29 +02:00
"react-popper": "^2.2.3",
2020-02-18 19:24:24 +01:00
"react-redux": "^7.2.0",
"react-responsive-carousel": "^3.2.21",
"react-router-dom": "^5.1.2",
"react-simple-file-input": "^2.0.0",
"react-tippy": "^1.2.2",
"react-toggle-button": "^2.2.0",
"react-transition-group": "^1.2.1",
"readable-stream": "^2.3.3",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0",
2022-10-11 17:04:32 +02:00
"remove-trailing-slash": "^0.1.1",
"reselect": "^3.0.1",
"ses": "^0.18.7",
2019-01-22 19:23:11 +01:00
"single-call-balance-checker-abi": "^1.0.0",
"unicode-confusables": "^0.1.1",
"uuid": "^8.3.2",
2022-03-07 16:35:03 +01:00
"web3-stream-provider": "^4.0.0",
"zxcvbn": "^4.4.2"
2015-08-01 03:38:02 +02:00
},
"devDependencies": {
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
Build - refactor for bundle factoring and swappable runtime (#11080) * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * Updating lockfile * lint fix * build/dev - patch watchifys incompatible binary stats output * ui - add comment about conditional import * build - improve comment * Update development/stream-flat-map.js Co-authored-by: Brad Decker <git@braddecker.dev> * Outputting all bundle file links (metamaskbot) Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: Brad Decker <git@braddecker.dev>
2021-07-15 19:59:34 +02:00
"@babel/code-frame": "^7.12.13",
"@babel/core": "^7.21.5",
Version v9.5.0 RC (#10944) * add trezor HD path for ledger wallets (#10616) Co-authored-by: Barry Gitarts <bgitarts@gmail.com> * Replace logic for eth swap token in fetchQuotesAndSetQuoteState with getSwapsEthToken call (#10624) * Ensure permission log will only store JSON-able data (#10524) * remove transactionCategory in favor of more types (#10615) * remove transactionCategory in favor of more types * remove reference to STANDARD in stubs * Removing double click bug from delete custom network modal (#10628) Fixes MetaMask/metamask-extension#10626 * Hide zero balance tokens at useTokenTracker layer (#10630) * Setting balance to 0x0 when the original value is undefined (#10634) * fix: speedup cancellation (#10579) fixes #7305 * no more node:console (#10640) * prefer chainId over networkId in most cases (#10594) * Move swaps constants to the shared constants directory (#10614) * Position the 3dot menu in the same spot on asset screen and home screen (#10642) * Ensure swaps detail height doesn't create jump in vertical height (#10644) * Fix: ETH 'token' now only appears once in the swaps to and from dropdowns. (#10650) * Prevent network menu highlighting (#10643) * Allow TextField to receive min and max attributes (#10656) * colocate tests in flat structure (#10655) * Fixing migration script generation paths (#10664) * Improve specificity of `test:unit:lax` npm script (#10661) The unit test npm script `test:unit:lax` is now more specific about which tests files to exclude. An `--ignore` CLI option is used to specify the files to ignore, rather than using the braces glob syntax to ignore them from the target glob itself. This makes the option easier to update going forward as we move more tests into the "strict" group, because the options are exactly the same between the two scripts. It also ensures we don't accidentally exclude other subdirectories that happen to also be named `permissions`. In trying to implement this, I stumbled at first because mocha expects the ignore pattern to be a relative path if the target is a relative path (i.e. they need to both start with `./` or neither). The script `test:unit:strict` has been updated to use a relative target pattern for consistency. * Swaps support for local testnet (#10658) * Swaps support for local testnet * Create util method for comparison of token addresses/symbols to default swaps token * Get chainId from txMeta in _trackSwapsMetrics of transaction controller * Add comment to document purpose of getTransactionGroupRecipientAddressFilter * Use isSwapsDefaultTokenSymbol in place of repeated defaultTokenSymbol comparisons in build-quote.js * fix: replace dnode background with JSON-RPC (#10627) fixes #10090 * Don't render faucet row in deposit modal for custom chains (#10674) Fixes MetaMask/metamask-extension#10038 * Change 'Send ETH' title to 'Send' (#10651) * Fixing incorrectly typed token decimal attribute (#10666) * refactor incoming tx controller (#10639) * make migration more safe (#10689) * Adding default properties to NetworkForm (#10682) Fixes MetaMask/metamask-extension#10681 * deps - remove "remotedev-server" (#10687) * deps - remove remotedev-server * Remove stale references from allow-scripts config Any packages that are no longer in the dependency tree have been removed from the `allow-scripts` config. Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Excluding sourcemaps comment in production builds (#10695) * Excluding sourcemaps comment in production builds Fixes MetaMask/metamask-extension#7077 * Fix source map explorer script The source map explorer script now re-adds the source map comment to each file to ensure the source map visualization still works. Each module with a sourcemap is copied to a temporary directory along with the module it corresponds to, and from there it's passed into `source-map-explorer`. This should ensure the resulting visualization matches what it was before. Everything has been moved inside of functions to generally improve readability, and to allow the use of local variables. Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Delete setupFetchDebugging.js (#10636) * Delete setupFetchDebugging.js * remove fetch-debugging (now handled corrently by sentry) * resolve issue with missing template error (#10692) * resolve issue with missing template error * also apply filtering to confirmation page * rename variable * Add MetaMask to list of BIP44 HD path examples (#10703) The "BIP44 Standard" HD path option in the Ledger connect flow listed only Trezor as an example. It seemed appropriate to include MetaMask as well, since we use the same path. This helps users who have imported their MetaMask seed phrase onto a Ledger device to discover this option. * Removing hard references to 12 word seed phrases in copy (#10704) Adding translation entry for "Wallet Seed" Fixed label padding issue by adding missing CSS rule * rule out empty string for symbol (#10712) * fix: remove unused `metamask.rpcUrl` from redux state + fix tests to reflect that (#10714) * Fix 10706 - Prevent autocomplete from add token input (#10700) * Fix mismatchedChain typo in custom network approval screen (#10723) * Fix 10562 - Hide the suggested token pane when not on Mainnet or test network (#10702) * Update @metamask/controllers to v6.2.1 (#10701) * Additional swaps network support (#10721) * Add swaps support for bnc chain * Use single default token address in shared/constants/swaps * ci - cache deps before patch-package (#10735) * ci - cache deps before patch-package * ci - bump dep cache number (cache break) * build - refactor build system for easier configuration (#10718) * build - refactor build system for easier configuration of before and after bundle * build - fix dependenciesToBundle option * build - fix bify external options and other config * build - refactor for cleanliness * build - fix minify argument * build - fix sourcemaps setup * scripts - refactor setupBundlerDefaults in anticipation of factor bundles * build - scripts - remove unused pipeline label * build - scripts - make filepath entry optional * build - scripts - rename filepath and filename options to entryFilepath and destFilepath * Update development/build/scripts.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * security - update SES lockdown (#10663) * update ses * build - reference ses directly * deps - unify regenerator-runtime versions on 0.13.7 * patches - apply regenerator-runtime ses compat patch\nhttps://github.com/facebook/regenerator/pull/411 * patches - patch regenerator-runtime for latest ses fix * reduc patch, new lockdown severe override taming * updated redux patch * update redux patch for production * ignore lockdown in lint * deps - bump patch-package just in case * trailing comma * remove ses as dep * fix path for frozen promise * remove js extension in lockdown require * Revert "ignore lockdown in lint" This reverts commit 8cefdc94dd25d7781bb09eed8af36441397676da. * Revert "build - reference ses directly" This reverts commit 30371a377dcdd781c1bf9abe55e9c8ae34da26b5. * deps - update ses * Revert "fix path for frozen promise" This reverts commit 966e4c60921a25befe8ca8dea58313cc25852f72. Co-authored-by: kumavis <aaron@kumavis.me> * Allow 11 characters in symbol for RPC (#10670) * Add error in RPC for zero length symbols * Increase RPC symbol length allowed to 11 * Add RPC tests for new symbol length checks * eth-block-tracker@5.0.1 (#10737) * Ensure swaps gas prices are fetched from the correct chain specific endpoint (#10744) * Ensure swaps gas prices are fetched from the correct chain specific endpoint * Just rely on fetchWithCache to cache swaps gas prices, instead of directly using storage in getSwapsPriceEstimatesLastRetrieved * Empty commit * update @metamask/etherscan-link to v2.0.0 (#10747) * Use correct block explorer name and link in swaps when on custom network (#10743) * Use correct block explorer name and link in swaps when on custom network. * Fix up custom etherscan link code in build-quote.js * Use blockExplorerUrl hostname instead of 'blockExplorerBaseUrl' * Use correct etherscan-link method for token links in build-quote * Create correct token link in build-quote for mainnet AND custom networks * Block explorer url improvements in awaiting-swap.js and build-quote.js * Use swapVerifyTokenExplanation message with substitutable block explorer for all applicable locales * Ensure that block explorer links are not shown in awaiting-swap if no url is available * Add New Zealand Dollar to currency options (#10746) * Ensure that the correct default currency symbols are used for fees on the view quote screen (#10753) * Fix 10517 - Prevent tokens without addresses from being added to token list (#10593) * Updating y18n and netmask to resolve dependency issues (#10765) netmask@1.0.6 -> 2.0.1, y18n@3.2.1 -> 3.2.2, y18n@4.0.0 -> 4.0.1 * Refactor Tx State Manager (#10672) Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Ensure that the approval fee in the swaps custom gas modal is in network specific currency (#10763) * Ensure that priceSlippage fiat amounts are always shown in view-quote.js (#10762) * Use network specific swaps contract address when checking swap contract token approval (#10774) * Build - refactor background process to use html (#10769) * build - declare background as html * build - fill in empty file when a missing file is expected * lint - fix * Update development/build/manifest.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Update development/build/manifest.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * build - fix use of empty file to replace unused js files (#10780) * cache lint results for faster repeat execution (#10773) * eslint perf improvement (#10775) * Improve detection of task process exit (#10776) Our build script waits for the `close` event to determine whether the task has exited. The `exit` event is a better representation of this, because if a stream is shared between multiple processes, the process may exit without the `close` event being emitted. We aren't sharing streams between processes, so this edge case doesn't apply to us. This just seemed like a more suitable event to listen to, since we care about the process exiting not the stream ending. See this description of the `close` event from the Node.js documentation [1]: >The `'close'` event is emitted when the stdio streams of a child >process have been closed. This is distinct from the `'exit'` event, >since multiple processes might share the same stdio streams. And see this description of the `exit` event: >The `'exit'` event is emitted after the child process ends. [1]: https://nodejs.org/docs/latest-v14.x/api/child_process.html#child_process_event_exit * Rewrite changelog script from Bash to JavaScript (#10782) The `auto-changelog` script has been rewritten from Bash to JavaScript. Functionally it should behave identically. * Refactoring ethereum-on.spec.js to use fixtures (#10778) * Remove useless negation (#10787) !contentComponent always evaluates to true * Remove date from changelog release header (#10790) New changelog release headers now omit the date. These headers are added automatically when a new release branch is created, and that rarely ends up being the actual date of the release, so these dates have all been inaccurate anyway. The date will be re-added to the changelog later as part of a new script, after a release has been published. * Remove script for creating master sync PR (#10791) The script responsible for creating the "Sync `master` with `develop`" PR has been removed. We will soon be eliminating the need for a `master` branch altogether, so we don't need this anymore. Also, this script hasn't been running correctly in a long time. We've been creating this PR manually. * Add changelog entries under release candidate header (#10784) Instead of always placing new changelog entries under the "Current Develop Branch" header, the changelog script now places them under the header for the current release if that release has not yet been tagged. This eliminates one manual step from the release process. Relates to #10752 * Prevent duplicate changelog entries (#10786) The changelog update script now prevents duplicate entries from being added. Specifically, it will ensure that if a PR has been referenced already in an entry, it will not add it again. This should prevent it from adding duplicate entries for changes that were cherry-picked into hotfix releases. Note that this duplication prevention only works for entries containing a PR number. We don't have any way to prevent duplicate entries yet in cases where we don't know the associated PR. We will be preventing this possibility entirely pretty soon in some upcoming release automation changes though, so I'm not concerned about this omission. * Set the BSC_CONTRACT_ADDRESS to lowercase (#10800) * only applies rules to the appropriate files (#10788) * upgrade eslint deps (#10789) * Ensure correct primary currency image is displayed on home screen and token list (#10777) * Add release header when updating changelog (#10794) The changelog update script now adds a release header if it doesn't find one already that matches the current release candidate version. * remove node-sass dependency (#10797) * Add support for locators into driver abstraction (#10802) * Update changelog headers and fix dates (#10805) The changelog release header format has been updated to match the "keep a changelog" [1] format. Each header is now the bracketed version number followed by a dash, then the release date in ISO-8601 format. The release dates in each header were also updated to match the date of the corresponding GitHub Release [2]. Many of these dates were incorrect because they were set on the day we created the release candidate, rather than on the day of release. Any changelog release entries without a corresponding GitHub release was left with the date already specified. The three oldest release headers were missing dates. For the first two, I used the date of the version bump commit. For the third, I removed it since no changes were listed anyway, and it represented a range of releases rather than a single one. The `auto-changelog.js` script has been updated to account for this new format as well. [1]: https://keepachangelog.com/en/1.0.0/ [2]: https://github.com/MetaMask/metamask-extension/releases * Update the changelog when creating an RC (#10795) The changelog will now be automatically updated when a release branch is created. A new release header along with changelog entries for any new commits will be added. Note that this changelog will still need to be manually cleaned up, but it's one less manual step at least. The old Bash script for adding a new release header to the changelog has been removed, as that functionality is now built into the changelog update script. A new script has been added to commit any changes made to the manifest and changelog. This step used to happen at the end of the bump manifest version script, but now the changelog update relies upon the manifest version bump happening first, so it needed to be re-ordered. The changes should only be committed on the first run of the branch, as it's contingent upon the manifest changing (due to the version bump). Further changelog updates won't trigger new automatic commits. * Refactoring address-book.spec.js to use fixtures (#10804) * Refactoring send-edit.spec.js to use fixtures (#10792) * Fix _getPermittedAccounts type safety (#10819) * Removing unnecessary params from withFixtures function call. (#10831) * Add links to release headers (#10808) Each release header now includes a link to the range of commits included with that release. These links are at the end of the document, in accordance with the "keep a changelog" [1] format. For the purpose of this changelog, the "previous release" is the most recent release mentioned in the changelogs. The diffs ignore any releases that were omitted from the changelog. This is mainly an issue with older releases, so it seemed acceptable. All releases have been documented for a couple of years now, and will be going forward as well. The name of the "Current Develop Branch" section was changed to "Unreleased" to confirm with "keep a changelog". The `auto-changelog.js` script has been updated to update/add these links whenever adding a new release header as well. [1]: https://keepachangelog.com/en/1.0.0/ * Refactoring permissions.spec.js to use fixtures (#10829) * Add validation for the `fee` property from the `/trades` API response (#10836) * Refactoring signature-request.spec.js to use fixtures (#10820) * use locator abstraction in tests folder (#10833) * Move BSC chain ID, rename some BSC-related vars (#10807) * Add categories to each changelog release (#10837) Each changelog release now has category headers. The standard "keep a changelog" [1] categories are used, along with the addition of "Uncategorized" for any changes that have not yet been categorized. The changelog script has been updated to add this "Uncategorized" header if it isn't already present, and to place any new commits under this header. The changelog has been updated to property categorize each change in recent releases, and to place changes in older releases under the header "Uncategorized". [1]: https://keepachangelog.com/en/1.0.0/ * Remove unused CI script (#10840) This script has not been used since #10795. It is now gone. * Add `--rc` flag to changelog script (#10839) The changelog script now accepts an `--rc` flag to tell it whether to add new changes to `Unreleased` or to the header for the current version. Previously this was inferred from whether the current version matched the most recent tag. However this method only works for the first update. Using a flag simplifies this logic, and makes it possible to manually re-run this for further updates to a release candidate. * Add `--help` flag to changelog script (#10846) The changelog script now accepts a `--help` flag, which prints a help text explaining how the script works and what each flag does. * add abstraction for waitForSelector (#10844) * Adds jest dependency (#10845) * Add Jest * Refactor changelog parsing and generation (#10847) The `auto-changelog.js` script has been refactoring into various different modules. This was done in preparation for migrating this to a separate repository, where it can be used in our libraries as well. Functionally this should act _mostly_ the same way, but there have been some changes. It was difficult to make this a pure refactor because of the strategy used to validate the changelog and ensure each addition remained valid. Instead of being updated in-place, the changelog is now parsed upfront and stored as a "Changelog" instance, which is a new class that was written to allow only valid changes. The new changelog is then stringified and completely overwrites the old one. The parsing had to be much more strict, as any unanticipated content would otherwise be erased unintentionally. This script now also normalizes the formatting of the changelog (though the individual change descriptions are still unformatted). The changelog stringification now accommodates non-linear releases as well. For example, you can now release v1.0.1 *after* v2.0.0, and it will be listed in chronological order while also correctly constructing the `compare` URLs for each release. * Increase default slippage from 2% to 3%, show Advanced Options by default (#10842) * Increase default slippage from 2% to 3%, show Advanced Options by default * Disable opening / closing of Advanced Options on the Swap page * Pre-select previously used slippage value when going back to the Swap page * Fix lint issues * Use a callback for setting up an initial customValue * Migrate unreleased changes in changelog (#10853) When updating the changelog for a release candidate, any unreleased changes are now migrated to the release header. Generally we don't make a habit of adding changes to the changelog prior to creating a release candidate, but if any are there we certainly don't want them duplicated. * @metamask/eslint-config*@6.0.0 (#10858) * @metamask/eslint-config*@6.0.0 * Minor eslintrc reorg * Refactoring threebox.spec.js to use fixtures (#10849) * Adjust renderWithProvider to accommodate redux-less components (#10857) * Jest config (#10855) * Setup jest config * Adjust test for jest. * Adjust lint config * Omit swaps ui folder for unit testing * Omit swaps from test:unit:lax * Add jest.config.js to script files * Restore mocks rather than clearing them. * Update jest config and adjust lint to include subdirs * Convert view-quote-price-difference test to jest * Add jest ci and ci coverage scripts. Add jest unit test to general test command * Add test coverage to ci * Use --ignore flag * Fixup * Add @metamask/eslint-config-jest * Update .eslintrc.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Adds jest-coverage/ Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Add jest-coverage/ to prettierignore (#10865) * Add jest coverage (#10868) * Add jest coverage This will add coverage for any tests ran in jest under the `test:coverage:jest` command, which is currently being used in CI. I set the values to the current test coverage in `ui/app/pages/swaps`. * Lint * Fix crash when adding new changelog release header (#10870) The `auto-changelog.js` script crashes when trying to add a new release header. This bug was introduced in #10847. The cause was a simple misnamed parameter. * Change caching for Swaps APIs from 1 hour to 5 minutes (#10871) * Change caching for the /tokens API from 1 hour to 5 minutes * Use 5 minutes caching for /topAssets and /aggregatorMetadata APIs as well * add key literals to driver (#10854) * Quote globs in prettier scripts (#10867) * use waitForSelector instead of until (#10852) * complete abstraction of until method * response to feedback * Adding recovery phrase video to onboarding process (#10717) * Adding recovery phrase video to onboarding process Adding english subtitles * Support textAlign in Box, converting sidebar to Box * Reduce calls of the `/featureFlag` API (#10859) * Remove periodic calls to the /featureFlag API * Always show the Swap button on the main page * Check if the Swaps feature is enabled, show loading animation while waiting * Reuse an existing useEffect call * Use ‘isFeatureFlagLoaded’ in React’s state, resolve lint issues * Add a watch mode for Jest testing * Add unit tests for Swaps: fetchSwapsLiveness, add /ducks/swaps into Jest testing * Remove Swaps Jest tests from Mocha’s ESLint rules * Ignore Swaps Jest tests while running Mocha, update paths * Increase test coverage to the current max * Fix ESLint issues for Swaps * Enable the Swaps feature by default and after state reset, remove loading screen before seeing Swaps * Update Jest config, fix tests * Update Jest coverage threshold to the current maximum * Update ESLint rule in jest.config.js * Disable the “Review Swap” button if the feature flag hasn’t loaded yet * Update jest threshold * Fix 10036 - Prevent odd localStorage migration error in Firefox (#10884) * Add jest watch mode script (#10869) * Refactoring metamask-responsive-ui.spec.js to use fixtures (#10866) * Handling infura blockage (#10883) * Handling infura blockage * Adding blockage home notification * Updating copy, adding temporary notification dismissal * Addressing review feedback * Using eth_blockNumber method to check Infura availability * Handling network changes in availability check * Use jest to run ui/**/*.test.js (#10885) * upgrade ethereumjs util (#10886) * Swaps: Show a network name dynamically in a tooltip (#10882) * Swaps: Show a network name dynamically in a tooltip * Replace “Ethereum” with “$1”, change “Test” to “Testnet” * Replace 이더리움 with $1 * Translate network names, use ‘Ethereum’ by default if a translation is not available yet * Reorder messages to resolve ESLint issues * Add a snapshot test for the FeeCard component, increase Jest threshold * Enable snapshot testing into external .snap files in ESLint * Add the “networkNameEthereum” key in ko/messages.json, remove default “Ethereum” value * Throw an error if chain ID is not supported by the Swaps feature * Use string literals when calling the `t` fn, * Adding option to set Custom Nonce to Confirm Approve Page (#10595) * Dep Upgrades for Lavamoat Patches (#10902) * dep upgrades * apply more patches * Dep upgrades and patches (#10903) * apply patches * lavamoat dep upgrades * remove lavamoat browserify * Increase Jest unit test coverage for the Swaps feature to ~25% (#10900) * Swaps: Show a network name dynamically in a tooltip * Replace “Ethereum” with “$1”, change “Test” to “Testnet” * Replace 이더리움 with $1 * Translate network names, use ‘Ethereum’ by default if a translation is not available yet * Reorder messages to resolve ESLint issues * Add a snapshot test for the FeeCard component, increase Jest threshold * Enable snapshot testing into external .snap files in ESLint * Add the “networkNameEthereum” key in ko/messages.json, remove default “Ethereum” value * Throw an error if chain ID is not supported by the Swaps feature * Use string literals when calling the `t` fn, * Watch Jest tests silently (no React warnings in terminal, only errors) * Add @testing-library/jest-dom, import it before running Jest tests * Add snapshot testing of Swaps’ React components for happy paths, increase minimum threshold for Jest * Add the test/jest folder for Jest setup and shared functions, use it in Swaps Jest tests * Fix ESLint issues, update linting config * Enable ESLint for .snap files (Jest snapshots), throw an error if a snapshot is bigger than 50 lines * Don’t run lint:fix for .snap files * Move `createProps` outside of `describe` blocks, move store creation inside tests * Use translations instead of keys, update a rendering function to load translations * Make sure all Jest snapshots are shorter than 50 lines (default limit) * Add / update props for Swaps tests * Fix React warnings when running tests for Swaps * Bump @metamask/contract-metadata from 1.23.0 to 1.25.0 (#10899) Bumps [@metamask/contract-metadata](https://github.com/MetaMask/contract-metadata) from 1.23.0 to 1.25.0. - [Release notes](https://github.com/MetaMask/contract-metadata/releases) - [Commits](https://github.com/MetaMask/contract-metadata/compare/v1.23.0...v1.25.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Refactoring from-import-ui.spec.js to use fixtures (#10907) * Fix 10458 - Understand where to get support (#10895) * Add contract address validation for token swaps (#10912) * Fixing ENS input entry in send flow (#10923) * Fixing ENS input entry in send flow Fixes MetaMask/metamask-extension#10691 * removed unnecessary apostrophe * Refactoring incremental-security.spec.js to use fixtures (#10917) * use one segment instance (#10915) * Implement Ledger Live bridge (#10293) * add view account-details menu item to token-options menu (#10932) * add view account-details menu item to token-options menu * add onViewAccountDetails propType * Fix 10609 - Prevent overflow of confirmation page hostname (#10935) * upgrade eth-keyring-controller (#10933) * [Fix] 10365 My Accounts Removal (#10680) * pushing my-accounts removal * removed CONTACT_MY_ACCOUNTS_ROUTE * removed CONTACT_MY_ACCOUNTS_VIEW_ROUTE * removing CONTACT_MY_ACCOUNTS_EDIT_ROUTE * removing CONTACT_MY_ACCOUNTS_EDIT_ROUTE * removed showingMyAccounts dead code * removed more dead code related to isMyAccountsPage * removing more dead code * fixed linting error(s) * removing my-accounts component/folder * added empty contact screen ui * styled empty contact page ui * fixed linting, removed add contacts button, and fixed errors * localized text and centered No Contacts * pushing localized verification and fixed e2e test * added listRoute redirect * added listroute and fixed linting error * Increase Jest unit test coverage for the Swaps feature to ~43% (#10934) * add hamburger menu to eth page (#10938) * add hamburger menu to eth page * change token-options to asset-options, use more direct selector for user address fetch * use token custom icons where possible (#10939) * Whats new popup (#10583) * Add 'What's New' notification popup * Move selectors from shared/notifications into ui/ directory * Use keys for localized message in whats new notifications objects, to ensure notifications will be translated. * Remove unused swaps intro popup locale messages * Fix keys of whats new notification locales * Remove notifications messages and descriptions from comment in shared/notifications * Move notifcationActionFunctions to shared/notifications and make it stateless * Get notification data from constants instead of state in whats-new-popup * Code cleanup * Fix build quote reference to swapsEthToken, broken during rebase * Rename notificationFilters to notificationToExclude to clarify its purpose * Documentation for getSortedNotificationsToShow * Move notification action functions from shared/ to whats-new-popup.js * Stop setting swapsWelcomeMessageHasBeenShown to state in app-state controller * Update e2e tests for whats new popup changes * Updating migration files * Addressing feedback part 1 * Addressing feedback part 2 * Remove unnecessary div in whats-new-popup * Change getNotificationsToExclude to getNotificationsToInclude for use in the getSortedNotificationsToShow selector * Delete intro-popup directory and test files * Lint fix * Add notifiction state to address-entry fixture * Use two separate functions for rendering first and subsequent notifications in the whats-new-popup * Ensure that string literals are passed to t for whats new popup text * Update import-ui fixtures to include notificaiton controller state * Remove unnecessary, accidental change confirm-approve * Remove swaps notification in favour of mobile swaps as first notifcation and TBD 3rd notification * Update whats-new-popup to use intersection observer api to detect if notification has been seen * Add notifications to send-edit and threebox e2e test fixtures * Update ui/app/selectors/selectors.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Update ui/app/selectors/selectors.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Clean up locale code for whats-new-popup notifications * Disconnect observers in whats-new-popup when their callback is first called * Add test case for migration 58 for when the AppStateController does not exist * Rename popover components containerRef to popoverWrapRef * Fix messages.json * Update notification messages and images * Rename popoverWrapRef -> popoverRef in whats-new-popup and popover.component * Only create one observer, and only after images have loaded, in whats-new-popup * Set width and height on whats-new-popup image, instead of setting state on img load * Update ui/app/components/app/whats-new-popup/whats-new-popup.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Code clean up in whats new popup re: notification rendering and action functions * Code cleanup in render notification functions of whats-new-popup * Update ui/app/components/app/whats-new-popup/whats-new-popup.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * lint fix * Update and localize notification dates * Clean up date code in shred/notifications/index.js Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Revert "Implement Ledger Live bridge (#10293)" This reverts commit 15b596ad15f2d569255c39e5e7babc8b7ab700ca. * Version v9.5.0 * Update changelog for v9.5.0 * yarn allow-scripts and yarn lavamoat:auto for Version-v9.5.0 branch * Anchor the Need Help text to the bottom of the expanded page (#10955) * fix transaction sync logic (#10954) * Add backwards compatibility for ETH <-> WETH contract address validation (#10962) * Whats new popup design fixes (#10964) * Remove padding on QR code image * Allow the qr code to be below the description in the whats new popup * Fix size and position of QR code in whats new notification * Add right caret to action links in whats new popup * Clean up placeImageBelowDescription logic * Fix display of whats-new-popup image * Improve spacing and sizing of whats new popup in both full screen and popup view * refactor * Ensure method of adding contact when contacts exist (#10963) * Fixing alignment issue with bottom notification (#10979) * Revert "Adding recovery phrase video to onboarding process (#10717)" This reverts commit 9e918b602655e0e4620ab19a3959a8fc08ec0f47. * Removing recovery video entry from changelog * Remove tests that are only needed for the commit reverted in 68c5defc * Fix dependency vulnerability by upgrading xmlhttprequest-ssl via yarn.lock (#10990) Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Barry Gitarts <bgitarts@gmail.com> Co-authored-by: Dan J Miller <danjm.com@gmail.com> Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com> Co-authored-by: Brad Decker <git@braddecker.dev> Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: David Walsh <davidwalsh83@gmail.com> Co-authored-by: Niranjana Binoy <43930900+NiranjanaBinoy@users.noreply.github.com> Co-authored-by: Shane <jonas.shane@gmail.com> Co-authored-by: gitpurva <47534619+gitpurva@users.noreply.github.com> Co-authored-by: kumavis <kumavis@users.noreply.github.com> Co-authored-by: Etienne Dusseault <etienne.dusseault@gmail.com> Co-authored-by: kumavis <aaron@kumavis.me> Co-authored-by: Grant Bakker <grant@bakker.pw> Co-authored-by: Michael Standen <screaminghawk@gmail.com> Co-authored-by: Muhammet Kara <mrkara@users.noreply.github.com> Co-authored-by: Daniel <80175477+dan437@users.noreply.github.com> Co-authored-by: Thomas Huang <tmashuang@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Thomas <thomas.b.huang@gmail.com> Co-authored-by: Alex Donesky <alex.donesky@consensys.net> Co-authored-by: Austin Akers <austin.akers5@gmail.com> Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
2021-05-05 20:08:59 +02:00
"@babel/eslint-parser": "^7.13.14",
"@babel/eslint-plugin": "^7.12.1",
"@babel/preset-env": "^7.5.5",
"@babel/preset-react": "^7.0.0",
Add TypeScript to the build system (#13489) This commit modifies the build system so that TypeScript files can be transpiled into ES5 just like JavaScript files. Note that this commit does NOT change the build system to run TypeScript files through the TypeScript compiler. In other words, no files will be type-checked at the build stage, as we expect type-checking to be handled elsewhere (live, via your editor integration with `tsserver`, and before a PR is merged, via `yarn lint`). Rather, we merely instruct Babel to strip TypeScript-specific syntax from any files that have it, as if those files had been written using JavaScript syntax alone. Why take this approach? Because it prevents the build process from being negatively impacted with respect to performance (as TypeScript takes a significant amount of time to run). It's worth noting the downside of this approach: because we aren't running files through TypeScript, but relying on Babel's [TypeScript transform][1] to identify TypeScript syntax, this transform has to keep up with any syntax changes that TypeScript adds in the future. In fact there are a few syntactical forms that Babel already does not recognize. These forms are rare or are deprecated by TypeScript, so I don't consider them to be a blocker, but it's worth noting just in case it comes up later. Also, any settings we place in `tsconfig.json` will be completely ignored by Babel. Again, this isn't a blocker because there are some analogs for the most important settings reflected in the options we can pass to the transform. These and other caveats are detailed in the [documentation for the transform][2]. [1]: https://babeljs.io/docs/en/babel-plugin-transform-typescript [2]: https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats
2022-03-29 00:33:40 +02:00
"@babel/preset-typescript": "^7.16.7",
"@babel/register": "^7.5.5",
"@ethersproject/bignumber": "^5.7.0",
"@lavamoat/allow-scripts": "^2.3.1",
"@lavamoat/lavapack": "^5.2.0",
"@metamask/auto-changelog": "^2.1.0",
"@metamask/eslint-config": "^9.0.0",
"@metamask/eslint-config-jest": "^9.0.0",
"@metamask/eslint-config-mocha": "^9.0.0",
"@metamask/eslint-config-nodejs": "^9.0.0",
"@metamask/eslint-config-typescript": "^9.0.1",
"@metamask/forwarder": "^1.1.0",
"@metamask/phishing-warning": "^2.1.0",
"@metamask/test-dapp": "^7.1.0",
"@sentry/cli": "^2.19.4",
"@storybook/addon-a11y": "^7.0.11",
"@storybook/addon-actions": "^7.0.11",
"@storybook/addon-essentials": "^7.0.11",
"@storybook/addon-knobs": "^7.0.2",
"@storybook/addon-mdx-gfm": "^7.0.11",
"@storybook/addons": "^7.0.11",
"@storybook/api": "^7.0.11",
"@storybook/client-api": "^7.0.11",
"@storybook/components": "^7.0.11",
"@storybook/core-events": "^7.0.11",
"@storybook/react": "^7.0.11",
"@storybook/react-webpack5": "^7.0.11",
"@storybook/storybook-deployer": "^2.8.16",
"@storybook/test-runner": "^0.10.0",
"@storybook/theming": "^7.0.11",
Version v9.5.0 RC (#10944) * add trezor HD path for ledger wallets (#10616) Co-authored-by: Barry Gitarts <bgitarts@gmail.com> * Replace logic for eth swap token in fetchQuotesAndSetQuoteState with getSwapsEthToken call (#10624) * Ensure permission log will only store JSON-able data (#10524) * remove transactionCategory in favor of more types (#10615) * remove transactionCategory in favor of more types * remove reference to STANDARD in stubs * Removing double click bug from delete custom network modal (#10628) Fixes MetaMask/metamask-extension#10626 * Hide zero balance tokens at useTokenTracker layer (#10630) * Setting balance to 0x0 when the original value is undefined (#10634) * fix: speedup cancellation (#10579) fixes #7305 * no more node:console (#10640) * prefer chainId over networkId in most cases (#10594) * Move swaps constants to the shared constants directory (#10614) * Position the 3dot menu in the same spot on asset screen and home screen (#10642) * Ensure swaps detail height doesn't create jump in vertical height (#10644) * Fix: ETH 'token' now only appears once in the swaps to and from dropdowns. (#10650) * Prevent network menu highlighting (#10643) * Allow TextField to receive min and max attributes (#10656) * colocate tests in flat structure (#10655) * Fixing migration script generation paths (#10664) * Improve specificity of `test:unit:lax` npm script (#10661) The unit test npm script `test:unit:lax` is now more specific about which tests files to exclude. An `--ignore` CLI option is used to specify the files to ignore, rather than using the braces glob syntax to ignore them from the target glob itself. This makes the option easier to update going forward as we move more tests into the "strict" group, because the options are exactly the same between the two scripts. It also ensures we don't accidentally exclude other subdirectories that happen to also be named `permissions`. In trying to implement this, I stumbled at first because mocha expects the ignore pattern to be a relative path if the target is a relative path (i.e. they need to both start with `./` or neither). The script `test:unit:strict` has been updated to use a relative target pattern for consistency. * Swaps support for local testnet (#10658) * Swaps support for local testnet * Create util method for comparison of token addresses/symbols to default swaps token * Get chainId from txMeta in _trackSwapsMetrics of transaction controller * Add comment to document purpose of getTransactionGroupRecipientAddressFilter * Use isSwapsDefaultTokenSymbol in place of repeated defaultTokenSymbol comparisons in build-quote.js * fix: replace dnode background with JSON-RPC (#10627) fixes #10090 * Don't render faucet row in deposit modal for custom chains (#10674) Fixes MetaMask/metamask-extension#10038 * Change 'Send ETH' title to 'Send' (#10651) * Fixing incorrectly typed token decimal attribute (#10666) * refactor incoming tx controller (#10639) * make migration more safe (#10689) * Adding default properties to NetworkForm (#10682) Fixes MetaMask/metamask-extension#10681 * deps - remove "remotedev-server" (#10687) * deps - remove remotedev-server * Remove stale references from allow-scripts config Any packages that are no longer in the dependency tree have been removed from the `allow-scripts` config. Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Excluding sourcemaps comment in production builds (#10695) * Excluding sourcemaps comment in production builds Fixes MetaMask/metamask-extension#7077 * Fix source map explorer script The source map explorer script now re-adds the source map comment to each file to ensure the source map visualization still works. Each module with a sourcemap is copied to a temporary directory along with the module it corresponds to, and from there it's passed into `source-map-explorer`. This should ensure the resulting visualization matches what it was before. Everything has been moved inside of functions to generally improve readability, and to allow the use of local variables. Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Delete setupFetchDebugging.js (#10636) * Delete setupFetchDebugging.js * remove fetch-debugging (now handled corrently by sentry) * resolve issue with missing template error (#10692) * resolve issue with missing template error * also apply filtering to confirmation page * rename variable * Add MetaMask to list of BIP44 HD path examples (#10703) The "BIP44 Standard" HD path option in the Ledger connect flow listed only Trezor as an example. It seemed appropriate to include MetaMask as well, since we use the same path. This helps users who have imported their MetaMask seed phrase onto a Ledger device to discover this option. * Removing hard references to 12 word seed phrases in copy (#10704) Adding translation entry for "Wallet Seed" Fixed label padding issue by adding missing CSS rule * rule out empty string for symbol (#10712) * fix: remove unused `metamask.rpcUrl` from redux state + fix tests to reflect that (#10714) * Fix 10706 - Prevent autocomplete from add token input (#10700) * Fix mismatchedChain typo in custom network approval screen (#10723) * Fix 10562 - Hide the suggested token pane when not on Mainnet or test network (#10702) * Update @metamask/controllers to v6.2.1 (#10701) * Additional swaps network support (#10721) * Add swaps support for bnc chain * Use single default token address in shared/constants/swaps * ci - cache deps before patch-package (#10735) * ci - cache deps before patch-package * ci - bump dep cache number (cache break) * build - refactor build system for easier configuration (#10718) * build - refactor build system for easier configuration of before and after bundle * build - fix dependenciesToBundle option * build - fix bify external options and other config * build - refactor for cleanliness * build - fix minify argument * build - fix sourcemaps setup * scripts - refactor setupBundlerDefaults in anticipation of factor bundles * build - scripts - remove unused pipeline label * build - scripts - make filepath entry optional * build - scripts - rename filepath and filename options to entryFilepath and destFilepath * Update development/build/scripts.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * security - update SES lockdown (#10663) * update ses * build - reference ses directly * deps - unify regenerator-runtime versions on 0.13.7 * patches - apply regenerator-runtime ses compat patch\nhttps://github.com/facebook/regenerator/pull/411 * patches - patch regenerator-runtime for latest ses fix * reduc patch, new lockdown severe override taming * updated redux patch * update redux patch for production * ignore lockdown in lint * deps - bump patch-package just in case * trailing comma * remove ses as dep * fix path for frozen promise * remove js extension in lockdown require * Revert "ignore lockdown in lint" This reverts commit 8cefdc94dd25d7781bb09eed8af36441397676da. * Revert "build - reference ses directly" This reverts commit 30371a377dcdd781c1bf9abe55e9c8ae34da26b5. * deps - update ses * Revert "fix path for frozen promise" This reverts commit 966e4c60921a25befe8ca8dea58313cc25852f72. Co-authored-by: kumavis <aaron@kumavis.me> * Allow 11 characters in symbol for RPC (#10670) * Add error in RPC for zero length symbols * Increase RPC symbol length allowed to 11 * Add RPC tests for new symbol length checks * eth-block-tracker@5.0.1 (#10737) * Ensure swaps gas prices are fetched from the correct chain specific endpoint (#10744) * Ensure swaps gas prices are fetched from the correct chain specific endpoint * Just rely on fetchWithCache to cache swaps gas prices, instead of directly using storage in getSwapsPriceEstimatesLastRetrieved * Empty commit * update @metamask/etherscan-link to v2.0.0 (#10747) * Use correct block explorer name and link in swaps when on custom network (#10743) * Use correct block explorer name and link in swaps when on custom network. * Fix up custom etherscan link code in build-quote.js * Use blockExplorerUrl hostname instead of 'blockExplorerBaseUrl' * Use correct etherscan-link method for token links in build-quote * Create correct token link in build-quote for mainnet AND custom networks * Block explorer url improvements in awaiting-swap.js and build-quote.js * Use swapVerifyTokenExplanation message with substitutable block explorer for all applicable locales * Ensure that block explorer links are not shown in awaiting-swap if no url is available * Add New Zealand Dollar to currency options (#10746) * Ensure that the correct default currency symbols are used for fees on the view quote screen (#10753) * Fix 10517 - Prevent tokens without addresses from being added to token list (#10593) * Updating y18n and netmask to resolve dependency issues (#10765) netmask@1.0.6 -> 2.0.1, y18n@3.2.1 -> 3.2.2, y18n@4.0.0 -> 4.0.1 * Refactor Tx State Manager (#10672) Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Ensure that the approval fee in the swaps custom gas modal is in network specific currency (#10763) * Ensure that priceSlippage fiat amounts are always shown in view-quote.js (#10762) * Use network specific swaps contract address when checking swap contract token approval (#10774) * Build - refactor background process to use html (#10769) * build - declare background as html * build - fill in empty file when a missing file is expected * lint - fix * Update development/build/manifest.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Update development/build/manifest.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * build - fix use of empty file to replace unused js files (#10780) * cache lint results for faster repeat execution (#10773) * eslint perf improvement (#10775) * Improve detection of task process exit (#10776) Our build script waits for the `close` event to determine whether the task has exited. The `exit` event is a better representation of this, because if a stream is shared between multiple processes, the process may exit without the `close` event being emitted. We aren't sharing streams between processes, so this edge case doesn't apply to us. This just seemed like a more suitable event to listen to, since we care about the process exiting not the stream ending. See this description of the `close` event from the Node.js documentation [1]: >The `'close'` event is emitted when the stdio streams of a child >process have been closed. This is distinct from the `'exit'` event, >since multiple processes might share the same stdio streams. And see this description of the `exit` event: >The `'exit'` event is emitted after the child process ends. [1]: https://nodejs.org/docs/latest-v14.x/api/child_process.html#child_process_event_exit * Rewrite changelog script from Bash to JavaScript (#10782) The `auto-changelog` script has been rewritten from Bash to JavaScript. Functionally it should behave identically. * Refactoring ethereum-on.spec.js to use fixtures (#10778) * Remove useless negation (#10787) !contentComponent always evaluates to true * Remove date from changelog release header (#10790) New changelog release headers now omit the date. These headers are added automatically when a new release branch is created, and that rarely ends up being the actual date of the release, so these dates have all been inaccurate anyway. The date will be re-added to the changelog later as part of a new script, after a release has been published. * Remove script for creating master sync PR (#10791) The script responsible for creating the "Sync `master` with `develop`" PR has been removed. We will soon be eliminating the need for a `master` branch altogether, so we don't need this anymore. Also, this script hasn't been running correctly in a long time. We've been creating this PR manually. * Add changelog entries under release candidate header (#10784) Instead of always placing new changelog entries under the "Current Develop Branch" header, the changelog script now places them under the header for the current release if that release has not yet been tagged. This eliminates one manual step from the release process. Relates to #10752 * Prevent duplicate changelog entries (#10786) The changelog update script now prevents duplicate entries from being added. Specifically, it will ensure that if a PR has been referenced already in an entry, it will not add it again. This should prevent it from adding duplicate entries for changes that were cherry-picked into hotfix releases. Note that this duplication prevention only works for entries containing a PR number. We don't have any way to prevent duplicate entries yet in cases where we don't know the associated PR. We will be preventing this possibility entirely pretty soon in some upcoming release automation changes though, so I'm not concerned about this omission. * Set the BSC_CONTRACT_ADDRESS to lowercase (#10800) * only applies rules to the appropriate files (#10788) * upgrade eslint deps (#10789) * Ensure correct primary currency image is displayed on home screen and token list (#10777) * Add release header when updating changelog (#10794) The changelog update script now adds a release header if it doesn't find one already that matches the current release candidate version. * remove node-sass dependency (#10797) * Add support for locators into driver abstraction (#10802) * Update changelog headers and fix dates (#10805) The changelog release header format has been updated to match the "keep a changelog" [1] format. Each header is now the bracketed version number followed by a dash, then the release date in ISO-8601 format. The release dates in each header were also updated to match the date of the corresponding GitHub Release [2]. Many of these dates were incorrect because they were set on the day we created the release candidate, rather than on the day of release. Any changelog release entries without a corresponding GitHub release was left with the date already specified. The three oldest release headers were missing dates. For the first two, I used the date of the version bump commit. For the third, I removed it since no changes were listed anyway, and it represented a range of releases rather than a single one. The `auto-changelog.js` script has been updated to account for this new format as well. [1]: https://keepachangelog.com/en/1.0.0/ [2]: https://github.com/MetaMask/metamask-extension/releases * Update the changelog when creating an RC (#10795) The changelog will now be automatically updated when a release branch is created. A new release header along with changelog entries for any new commits will be added. Note that this changelog will still need to be manually cleaned up, but it's one less manual step at least. The old Bash script for adding a new release header to the changelog has been removed, as that functionality is now built into the changelog update script. A new script has been added to commit any changes made to the manifest and changelog. This step used to happen at the end of the bump manifest version script, but now the changelog update relies upon the manifest version bump happening first, so it needed to be re-ordered. The changes should only be committed on the first run of the branch, as it's contingent upon the manifest changing (due to the version bump). Further changelog updates won't trigger new automatic commits. * Refactoring address-book.spec.js to use fixtures (#10804) * Refactoring send-edit.spec.js to use fixtures (#10792) * Fix _getPermittedAccounts type safety (#10819) * Removing unnecessary params from withFixtures function call. (#10831) * Add links to release headers (#10808) Each release header now includes a link to the range of commits included with that release. These links are at the end of the document, in accordance with the "keep a changelog" [1] format. For the purpose of this changelog, the "previous release" is the most recent release mentioned in the changelogs. The diffs ignore any releases that were omitted from the changelog. This is mainly an issue with older releases, so it seemed acceptable. All releases have been documented for a couple of years now, and will be going forward as well. The name of the "Current Develop Branch" section was changed to "Unreleased" to confirm with "keep a changelog". The `auto-changelog.js` script has been updated to update/add these links whenever adding a new release header as well. [1]: https://keepachangelog.com/en/1.0.0/ * Refactoring permissions.spec.js to use fixtures (#10829) * Add validation for the `fee` property from the `/trades` API response (#10836) * Refactoring signature-request.spec.js to use fixtures (#10820) * use locator abstraction in tests folder (#10833) * Move BSC chain ID, rename some BSC-related vars (#10807) * Add categories to each changelog release (#10837) Each changelog release now has category headers. The standard "keep a changelog" [1] categories are used, along with the addition of "Uncategorized" for any changes that have not yet been categorized. The changelog script has been updated to add this "Uncategorized" header if it isn't already present, and to place any new commits under this header. The changelog has been updated to property categorize each change in recent releases, and to place changes in older releases under the header "Uncategorized". [1]: https://keepachangelog.com/en/1.0.0/ * Remove unused CI script (#10840) This script has not been used since #10795. It is now gone. * Add `--rc` flag to changelog script (#10839) The changelog script now accepts an `--rc` flag to tell it whether to add new changes to `Unreleased` or to the header for the current version. Previously this was inferred from whether the current version matched the most recent tag. However this method only works for the first update. Using a flag simplifies this logic, and makes it possible to manually re-run this for further updates to a release candidate. * Add `--help` flag to changelog script (#10846) The changelog script now accepts a `--help` flag, which prints a help text explaining how the script works and what each flag does. * add abstraction for waitForSelector (#10844) * Adds jest dependency (#10845) * Add Jest * Refactor changelog parsing and generation (#10847) The `auto-changelog.js` script has been refactoring into various different modules. This was done in preparation for migrating this to a separate repository, where it can be used in our libraries as well. Functionally this should act _mostly_ the same way, but there have been some changes. It was difficult to make this a pure refactor because of the strategy used to validate the changelog and ensure each addition remained valid. Instead of being updated in-place, the changelog is now parsed upfront and stored as a "Changelog" instance, which is a new class that was written to allow only valid changes. The new changelog is then stringified and completely overwrites the old one. The parsing had to be much more strict, as any unanticipated content would otherwise be erased unintentionally. This script now also normalizes the formatting of the changelog (though the individual change descriptions are still unformatted). The changelog stringification now accommodates non-linear releases as well. For example, you can now release v1.0.1 *after* v2.0.0, and it will be listed in chronological order while also correctly constructing the `compare` URLs for each release. * Increase default slippage from 2% to 3%, show Advanced Options by default (#10842) * Increase default slippage from 2% to 3%, show Advanced Options by default * Disable opening / closing of Advanced Options on the Swap page * Pre-select previously used slippage value when going back to the Swap page * Fix lint issues * Use a callback for setting up an initial customValue * Migrate unreleased changes in changelog (#10853) When updating the changelog for a release candidate, any unreleased changes are now migrated to the release header. Generally we don't make a habit of adding changes to the changelog prior to creating a release candidate, but if any are there we certainly don't want them duplicated. * @metamask/eslint-config*@6.0.0 (#10858) * @metamask/eslint-config*@6.0.0 * Minor eslintrc reorg * Refactoring threebox.spec.js to use fixtures (#10849) * Adjust renderWithProvider to accommodate redux-less components (#10857) * Jest config (#10855) * Setup jest config * Adjust test for jest. * Adjust lint config * Omit swaps ui folder for unit testing * Omit swaps from test:unit:lax * Add jest.config.js to script files * Restore mocks rather than clearing them. * Update jest config and adjust lint to include subdirs * Convert view-quote-price-difference test to jest * Add jest ci and ci coverage scripts. Add jest unit test to general test command * Add test coverage to ci * Use --ignore flag * Fixup * Add @metamask/eslint-config-jest * Update .eslintrc.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Adds jest-coverage/ Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Add jest-coverage/ to prettierignore (#10865) * Add jest coverage (#10868) * Add jest coverage This will add coverage for any tests ran in jest under the `test:coverage:jest` command, which is currently being used in CI. I set the values to the current test coverage in `ui/app/pages/swaps`. * Lint * Fix crash when adding new changelog release header (#10870) The `auto-changelog.js` script crashes when trying to add a new release header. This bug was introduced in #10847. The cause was a simple misnamed parameter. * Change caching for Swaps APIs from 1 hour to 5 minutes (#10871) * Change caching for the /tokens API from 1 hour to 5 minutes * Use 5 minutes caching for /topAssets and /aggregatorMetadata APIs as well * add key literals to driver (#10854) * Quote globs in prettier scripts (#10867) * use waitForSelector instead of until (#10852) * complete abstraction of until method * response to feedback * Adding recovery phrase video to onboarding process (#10717) * Adding recovery phrase video to onboarding process Adding english subtitles * Support textAlign in Box, converting sidebar to Box * Reduce calls of the `/featureFlag` API (#10859) * Remove periodic calls to the /featureFlag API * Always show the Swap button on the main page * Check if the Swaps feature is enabled, show loading animation while waiting * Reuse an existing useEffect call * Use ‘isFeatureFlagLoaded’ in React’s state, resolve lint issues * Add a watch mode for Jest testing * Add unit tests for Swaps: fetchSwapsLiveness, add /ducks/swaps into Jest testing * Remove Swaps Jest tests from Mocha’s ESLint rules * Ignore Swaps Jest tests while running Mocha, update paths * Increase test coverage to the current max * Fix ESLint issues for Swaps * Enable the Swaps feature by default and after state reset, remove loading screen before seeing Swaps * Update Jest config, fix tests * Update Jest coverage threshold to the current maximum * Update ESLint rule in jest.config.js * Disable the “Review Swap” button if the feature flag hasn’t loaded yet * Update jest threshold * Fix 10036 - Prevent odd localStorage migration error in Firefox (#10884) * Add jest watch mode script (#10869) * Refactoring metamask-responsive-ui.spec.js to use fixtures (#10866) * Handling infura blockage (#10883) * Handling infura blockage * Adding blockage home notification * Updating copy, adding temporary notification dismissal * Addressing review feedback * Using eth_blockNumber method to check Infura availability * Handling network changes in availability check * Use jest to run ui/**/*.test.js (#10885) * upgrade ethereumjs util (#10886) * Swaps: Show a network name dynamically in a tooltip (#10882) * Swaps: Show a network name dynamically in a tooltip * Replace “Ethereum” with “$1”, change “Test” to “Testnet” * Replace 이더리움 with $1 * Translate network names, use ‘Ethereum’ by default if a translation is not available yet * Reorder messages to resolve ESLint issues * Add a snapshot test for the FeeCard component, increase Jest threshold * Enable snapshot testing into external .snap files in ESLint * Add the “networkNameEthereum” key in ko/messages.json, remove default “Ethereum” value * Throw an error if chain ID is not supported by the Swaps feature * Use string literals when calling the `t` fn, * Adding option to set Custom Nonce to Confirm Approve Page (#10595) * Dep Upgrades for Lavamoat Patches (#10902) * dep upgrades * apply more patches * Dep upgrades and patches (#10903) * apply patches * lavamoat dep upgrades * remove lavamoat browserify * Increase Jest unit test coverage for the Swaps feature to ~25% (#10900) * Swaps: Show a network name dynamically in a tooltip * Replace “Ethereum” with “$1”, change “Test” to “Testnet” * Replace 이더리움 with $1 * Translate network names, use ‘Ethereum’ by default if a translation is not available yet * Reorder messages to resolve ESLint issues * Add a snapshot test for the FeeCard component, increase Jest threshold * Enable snapshot testing into external .snap files in ESLint * Add the “networkNameEthereum” key in ko/messages.json, remove default “Ethereum” value * Throw an error if chain ID is not supported by the Swaps feature * Use string literals when calling the `t` fn, * Watch Jest tests silently (no React warnings in terminal, only errors) * Add @testing-library/jest-dom, import it before running Jest tests * Add snapshot testing of Swaps’ React components for happy paths, increase minimum threshold for Jest * Add the test/jest folder for Jest setup and shared functions, use it in Swaps Jest tests * Fix ESLint issues, update linting config * Enable ESLint for .snap files (Jest snapshots), throw an error if a snapshot is bigger than 50 lines * Don’t run lint:fix for .snap files * Move `createProps` outside of `describe` blocks, move store creation inside tests * Use translations instead of keys, update a rendering function to load translations * Make sure all Jest snapshots are shorter than 50 lines (default limit) * Add / update props for Swaps tests * Fix React warnings when running tests for Swaps * Bump @metamask/contract-metadata from 1.23.0 to 1.25.0 (#10899) Bumps [@metamask/contract-metadata](https://github.com/MetaMask/contract-metadata) from 1.23.0 to 1.25.0. - [Release notes](https://github.com/MetaMask/contract-metadata/releases) - [Commits](https://github.com/MetaMask/contract-metadata/compare/v1.23.0...v1.25.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Refactoring from-import-ui.spec.js to use fixtures (#10907) * Fix 10458 - Understand where to get support (#10895) * Add contract address validation for token swaps (#10912) * Fixing ENS input entry in send flow (#10923) * Fixing ENS input entry in send flow Fixes MetaMask/metamask-extension#10691 * removed unnecessary apostrophe * Refactoring incremental-security.spec.js to use fixtures (#10917) * use one segment instance (#10915) * Implement Ledger Live bridge (#10293) * add view account-details menu item to token-options menu (#10932) * add view account-details menu item to token-options menu * add onViewAccountDetails propType * Fix 10609 - Prevent overflow of confirmation page hostname (#10935) * upgrade eth-keyring-controller (#10933) * [Fix] 10365 My Accounts Removal (#10680) * pushing my-accounts removal * removed CONTACT_MY_ACCOUNTS_ROUTE * removed CONTACT_MY_ACCOUNTS_VIEW_ROUTE * removing CONTACT_MY_ACCOUNTS_EDIT_ROUTE * removing CONTACT_MY_ACCOUNTS_EDIT_ROUTE * removed showingMyAccounts dead code * removed more dead code related to isMyAccountsPage * removing more dead code * fixed linting error(s) * removing my-accounts component/folder * added empty contact screen ui * styled empty contact page ui * fixed linting, removed add contacts button, and fixed errors * localized text and centered No Contacts * pushing localized verification and fixed e2e test * added listRoute redirect * added listroute and fixed linting error * Increase Jest unit test coverage for the Swaps feature to ~43% (#10934) * add hamburger menu to eth page (#10938) * add hamburger menu to eth page * change token-options to asset-options, use more direct selector for user address fetch * use token custom icons where possible (#10939) * Whats new popup (#10583) * Add 'What's New' notification popup * Move selectors from shared/notifications into ui/ directory * Use keys for localized message in whats new notifications objects, to ensure notifications will be translated. * Remove unused swaps intro popup locale messages * Fix keys of whats new notification locales * Remove notifications messages and descriptions from comment in shared/notifications * Move notifcationActionFunctions to shared/notifications and make it stateless * Get notification data from constants instead of state in whats-new-popup * Code cleanup * Fix build quote reference to swapsEthToken, broken during rebase * Rename notificationFilters to notificationToExclude to clarify its purpose * Documentation for getSortedNotificationsToShow * Move notification action functions from shared/ to whats-new-popup.js * Stop setting swapsWelcomeMessageHasBeenShown to state in app-state controller * Update e2e tests for whats new popup changes * Updating migration files * Addressing feedback part 1 * Addressing feedback part 2 * Remove unnecessary div in whats-new-popup * Change getNotificationsToExclude to getNotificationsToInclude for use in the getSortedNotificationsToShow selector * Delete intro-popup directory and test files * Lint fix * Add notifiction state to address-entry fixture * Use two separate functions for rendering first and subsequent notifications in the whats-new-popup * Ensure that string literals are passed to t for whats new popup text * Update import-ui fixtures to include notificaiton controller state * Remove unnecessary, accidental change confirm-approve * Remove swaps notification in favour of mobile swaps as first notifcation and TBD 3rd notification * Update whats-new-popup to use intersection observer api to detect if notification has been seen * Add notifications to send-edit and threebox e2e test fixtures * Update ui/app/selectors/selectors.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Update ui/app/selectors/selectors.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Clean up locale code for whats-new-popup notifications * Disconnect observers in whats-new-popup when their callback is first called * Add test case for migration 58 for when the AppStateController does not exist * Rename popover components containerRef to popoverWrapRef * Fix messages.json * Update notification messages and images * Rename popoverWrapRef -> popoverRef in whats-new-popup and popover.component * Only create one observer, and only after images have loaded, in whats-new-popup * Set width and height on whats-new-popup image, instead of setting state on img load * Update ui/app/components/app/whats-new-popup/whats-new-popup.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Code clean up in whats new popup re: notification rendering and action functions * Code cleanup in render notification functions of whats-new-popup * Update ui/app/components/app/whats-new-popup/whats-new-popup.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * lint fix * Update and localize notification dates * Clean up date code in shred/notifications/index.js Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Revert "Implement Ledger Live bridge (#10293)" This reverts commit 15b596ad15f2d569255c39e5e7babc8b7ab700ca. * Version v9.5.0 * Update changelog for v9.5.0 * yarn allow-scripts and yarn lavamoat:auto for Version-v9.5.0 branch * Anchor the Need Help text to the bottom of the expanded page (#10955) * fix transaction sync logic (#10954) * Add backwards compatibility for ETH <-> WETH contract address validation (#10962) * Whats new popup design fixes (#10964) * Remove padding on QR code image * Allow the qr code to be below the description in the whats new popup * Fix size and position of QR code in whats new notification * Add right caret to action links in whats new popup * Clean up placeImageBelowDescription logic * Fix display of whats-new-popup image * Improve spacing and sizing of whats new popup in both full screen and popup view * refactor * Ensure method of adding contact when contacts exist (#10963) * Fixing alignment issue with bottom notification (#10979) * Revert "Adding recovery phrase video to onboarding process (#10717)" This reverts commit 9e918b602655e0e4620ab19a3959a8fc08ec0f47. * Removing recovery video entry from changelog * Remove tests that are only needed for the commit reverted in 68c5defc * Fix dependency vulnerability by upgrading xmlhttprequest-ssl via yarn.lock (#10990) Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Barry Gitarts <bgitarts@gmail.com> Co-authored-by: Dan J Miller <danjm.com@gmail.com> Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com> Co-authored-by: Brad Decker <git@braddecker.dev> Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: David Walsh <davidwalsh83@gmail.com> Co-authored-by: Niranjana Binoy <43930900+NiranjanaBinoy@users.noreply.github.com> Co-authored-by: Shane <jonas.shane@gmail.com> Co-authored-by: gitpurva <47534619+gitpurva@users.noreply.github.com> Co-authored-by: kumavis <kumavis@users.noreply.github.com> Co-authored-by: Etienne Dusseault <etienne.dusseault@gmail.com> Co-authored-by: kumavis <aaron@kumavis.me> Co-authored-by: Grant Bakker <grant@bakker.pw> Co-authored-by: Michael Standen <screaminghawk@gmail.com> Co-authored-by: Muhammet Kara <mrkara@users.noreply.github.com> Co-authored-by: Daniel <80175477+dan437@users.noreply.github.com> Co-authored-by: Thomas Huang <tmashuang@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Thomas <thomas.b.huang@gmail.com> Co-authored-by: Alex Donesky <alex.donesky@consensys.net> Co-authored-by: Austin Akers <austin.akers5@gmail.com> Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
2021-05-05 20:08:59 +02:00
"@testing-library/jest-dom": "^5.11.10",
"@testing-library/react": "^10.4.8",
"@testing-library/react-hooks": "^8.0.1",
2022-08-23 22:13:02 +02:00
"@testing-library/user-event": "^14.4.3",
"@tsconfig/node16": "^1.0.3",
Add TypeScript migration dashboard (#13820) As we convert parts of the codebase to TypeScript, we will want a way to track progress. This commit adds a dashboard which displays all of the files that we wish to convert to TypeScript and which files we've already converted. The list of all possible files to convert is predetermined by walking the dependency graph of each entrypoint the build system uses to compile the extension (the files that the entrypoint imports, the files that the imports import, etc). The list should not need to be regenerated, but you can do it by running: yarn ts-migration:enumerate The dashboard is implemented as a separate React app. The CircleCI configuration has been updated so that when a new commit is pushed, the React app is built and stored in the CircleCI artifacts. When a PR is merged, the built files will be pushed to a separate repo whose sole purpose is to serve the dashboard via GitHub Pages (this is the same way that the Storybook works). All of the app code and script to build the app are self-contained under `development/ts-migration-dashboard`. To build this app yourself, you can run: yarn ts-migration:dashboard:build or if you want to build automatically as you change files, run: yarn ts-migration:dashboard:watch Then open the following file in your browser (there is no server component): development/ts-migration-dashboard/build/index.html Finally, although you shouldn't have to do this, to manually deploy the dashboard once built, you can run: git remote add ts-migration-dashboard git@github.com:MetaMask/metamask-extension-ts-migration-dashboard.git yarn ts-migration:dashboard:deploy
2022-08-09 22:16:08 +02:00
"@types/babelify": "^7.3.7",
"@types/browserify": "^12.0.37",
"@types/currency-formatter": "^1.5.1",
Add TypeScript migration dashboard (#13820) As we convert parts of the codebase to TypeScript, we will want a way to track progress. This commit adds a dashboard which displays all of the files that we wish to convert to TypeScript and which files we've already converted. The list of all possible files to convert is predetermined by walking the dependency graph of each entrypoint the build system uses to compile the extension (the files that the entrypoint imports, the files that the imports import, etc). The list should not need to be regenerated, but you can do it by running: yarn ts-migration:enumerate The dashboard is implemented as a separate React app. The CircleCI configuration has been updated so that when a new commit is pushed, the React app is built and stored in the CircleCI artifacts. When a PR is merged, the built files will be pushed to a separate repo whose sole purpose is to serve the dashboard via GitHub Pages (this is the same way that the Storybook works). All of the app code and script to build the app are self-contained under `development/ts-migration-dashboard`. To build this app yourself, you can run: yarn ts-migration:dashboard:build or if you want to build automatically as you change files, run: yarn ts-migration:dashboard:watch Then open the following file in your browser (there is no server component): development/ts-migration-dashboard/build/index.html Finally, although you shouldn't have to do this, to manually deploy the dashboard once built, you can run: git remote add ts-migration-dashboard git@github.com:MetaMask/metamask-extension-ts-migration-dashboard.git yarn ts-migration:dashboard:deploy
2022-08-09 22:16:08 +02:00
"@types/end-of-stream": "^1.4.1",
"@types/fs-extra": "^9.0.13",
"@types/gulp": "^4.0.9",
"@types/gulp-autoprefixer": "^0.0.33",
"@types/gulp-sass": "^5.0.0",
Add TypeScript migration dashboard (#13820) As we convert parts of the codebase to TypeScript, we will want a way to track progress. This commit adds a dashboard which displays all of the files that we wish to convert to TypeScript and which files we've already converted. The list of all possible files to convert is predetermined by walking the dependency graph of each entrypoint the build system uses to compile the extension (the files that the entrypoint imports, the files that the imports import, etc). The list should not need to be regenerated, but you can do it by running: yarn ts-migration:enumerate The dashboard is implemented as a separate React app. The CircleCI configuration has been updated so that when a new commit is pushed, the React app is built and stored in the CircleCI artifacts. When a PR is merged, the built files will be pushed to a separate repo whose sole purpose is to serve the dashboard via GitHub Pages (this is the same way that the Storybook works). All of the app code and script to build the app are self-contained under `development/ts-migration-dashboard`. To build this app yourself, you can run: yarn ts-migration:dashboard:build or if you want to build automatically as you change files, run: yarn ts-migration:dashboard:watch Then open the following file in your browser (there is no server component): development/ts-migration-dashboard/build/index.html Finally, although you shouldn't have to do this, to manually deploy the dashboard once built, you can run: git remote add ts-migration-dashboard git@github.com:MetaMask/metamask-extension-ts-migration-dashboard.git yarn ts-migration:dashboard:deploy
2022-08-09 22:16:08 +02:00
"@types/gulp-sourcemaps": "^0.0.35",
"@types/jest": "^29.1.2",
Add TypeScript migration dashboard (#13820) As we convert parts of the codebase to TypeScript, we will want a way to track progress. This commit adds a dashboard which displays all of the files that we wish to convert to TypeScript and which files we've already converted. The list of all possible files to convert is predetermined by walking the dependency graph of each entrypoint the build system uses to compile the extension (the files that the entrypoint imports, the files that the imports import, etc). The list should not need to be regenerated, but you can do it by running: yarn ts-migration:enumerate The dashboard is implemented as a separate React app. The CircleCI configuration has been updated so that when a new commit is pushed, the React app is built and stored in the CircleCI artifacts. When a PR is merged, the built files will be pushed to a separate repo whose sole purpose is to serve the dashboard via GitHub Pages (this is the same way that the Storybook works). All of the app code and script to build the app are self-contained under `development/ts-migration-dashboard`. To build this app yourself, you can run: yarn ts-migration:dashboard:build or if you want to build automatically as you change files, run: yarn ts-migration:dashboard:watch Then open the following file in your browser (there is no server component): development/ts-migration-dashboard/build/index.html Finally, although you shouldn't have to do this, to manually deploy the dashboard once built, you can run: git remote add ts-migration-dashboard git@github.com:MetaMask/metamask-extension-ts-migration-dashboard.git yarn ts-migration:dashboard:deploy
2022-08-09 22:16:08 +02:00
"@types/madge": "^5.0.0",
"@types/node": "^17.0.21",
"@types/pify": "^5.0.1",
"@types/pump": "^1.1.1",
"@types/react": "^16.9.53",
Add TypeScript migration dashboard (#13820) As we convert parts of the codebase to TypeScript, we will want a way to track progress. This commit adds a dashboard which displays all of the files that we wish to convert to TypeScript and which files we've already converted. The list of all possible files to convert is predetermined by walking the dependency graph of each entrypoint the build system uses to compile the extension (the files that the entrypoint imports, the files that the imports import, etc). The list should not need to be regenerated, but you can do it by running: yarn ts-migration:enumerate The dashboard is implemented as a separate React app. The CircleCI configuration has been updated so that when a new commit is pushed, the React app is built and stored in the CircleCI artifacts. When a PR is merged, the built files will be pushed to a separate repo whose sole purpose is to serve the dashboard via GitHub Pages (this is the same way that the Storybook works). All of the app code and script to build the app are self-contained under `development/ts-migration-dashboard`. To build this app yourself, you can run: yarn ts-migration:dashboard:build or if you want to build automatically as you change files, run: yarn ts-migration:dashboard:watch Then open the following file in your browser (there is no server component): development/ts-migration-dashboard/build/index.html Finally, although you shouldn't have to do this, to manually deploy the dashboard once built, you can run: git remote add ts-migration-dashboard git@github.com:MetaMask/metamask-extension-ts-migration-dashboard.git yarn ts-migration:dashboard:deploy
2022-08-09 22:16:08 +02:00
"@types/react-dom": "^17.0.11",
"@types/react-redux": "^7.1.25",
feat(srp): add a quiz to the SRP reveal (#19283) * feat(srp): add a quiz to the SRP reveal * fixed the popover header centering * lint fixes * converted from `ui/components/ui/popover` to `ui/components/component-library/modal` * responded to @darkwing review * added unit tests * renamed the folder to 'srp-quiz-modal' * responded to Monte's review * using i18n-helper in the test suite * small improvement to JSXDict comments * wrote a new webdriver.holdMouseDownOnElement() to assist with testing the "Hold to reveal SRP" button * Updating layout and some storybook naming and migrating to tsx * Apply suggestions from @georgewrmarshall Co-authored-by: George Marshall <george.marshall@consensys.net> * Unit test searches by data-testid instead of by text * new layout and copy for the Settings->Security page * now with 100% test coverage for /ui/pages/settings/security-tab fixes #16871 fixes #18140 * e2e tests to reveal SRP after quiz * e2e- Fix lint, remove unneeded extras * @coreyjanssen and @georgewrmarshall compromise Co-authored-by: George Marshall <george.marshall@consensys.net> Co-authored-by: Corey Janssen <corey.janssen@consensys.net> * trying isRequired again * transparent background on PNG * [e2e] moving functions to helpers and adding testid for SRP reveal quiz (#19481) * moving functions to helpers and adding testid * fix lint error * took out the IPFS gateway fixes * lint fix * translations of SRP Reveal Quiz * new Spanish translation from Guto * Update describe for e2e tests * Apply suggestion from @georgewrmarshall Co-authored-by: George Marshall <george.marshall@consensys.net> * fixed the Tab key problem --------- Co-authored-by: georgewrmarshall <george.marshall@consensys.net> Co-authored-by: Plasma Corral <32695229+plasmacorral@users.noreply.github.com> Co-authored-by: Corey Janssen <corey.janssen@consensys.net>
2023-06-20 20:27:10 +02:00
"@types/react-router-dom": "^5.3.3",
"@types/remote-redux-devtools": "^0.5.5",
"@types/sass": "^1.43.1",
"@types/sinon": "^10.0.13",
"@types/w3c-web-hid": "^1.0.3",
Add TypeScript migration dashboard (#13820) As we convert parts of the codebase to TypeScript, we will want a way to track progress. This commit adds a dashboard which displays all of the files that we wish to convert to TypeScript and which files we've already converted. The list of all possible files to convert is predetermined by walking the dependency graph of each entrypoint the build system uses to compile the extension (the files that the entrypoint imports, the files that the imports import, etc). The list should not need to be regenerated, but you can do it by running: yarn ts-migration:enumerate The dashboard is implemented as a separate React app. The CircleCI configuration has been updated so that when a new commit is pushed, the React app is built and stored in the CircleCI artifacts. When a PR is merged, the built files will be pushed to a separate repo whose sole purpose is to serve the dashboard via GitHub Pages (this is the same way that the Storybook works). All of the app code and script to build the app are self-contained under `development/ts-migration-dashboard`. To build this app yourself, you can run: yarn ts-migration:dashboard:build or if you want to build automatically as you change files, run: yarn ts-migration:dashboard:watch Then open the following file in your browser (there is no server component): development/ts-migration-dashboard/build/index.html Finally, although you shouldn't have to do this, to manually deploy the dashboard once built, you can run: git remote add ts-migration-dashboard git@github.com:MetaMask/metamask-extension-ts-migration-dashboard.git yarn ts-migration:dashboard:deploy
2022-08-09 22:16:08 +02:00
"@types/watchify": "^3.11.1",
"@types/yargs": "^17.0.8",
2022-07-26 20:10:51 +02:00
"@typescript-eslint/eslint-plugin": "^5.30.7",
"@typescript-eslint/parser": "^5.30.7",
"@whitespace/storybook-addon-html": "^5.1.6",
"addons-linter": "^5.2.0",
"babel-plugin-module-resolver": "^5.0.0",
"babelify": "^10.0.0",
"bify-module-groups": "^2.0.0",
"brfs": "^2.0.2",
Feature: Transaction Insights (#12881) * integration for tx decoding confirmation and history view * upgrading @truffle/decoder to latest release 5.1.0 * Update acorn and colors patches * feat: remove redundant styling * feat: basic integration for nickname components * feat: wiring functionality of adding new nickname * feat: wire functionality of showing nickname modal * feat: link the nickname popover with add/update popover * feat: moving forward with address nicknames integration * feat: fixing a bug related to passing chainId in addressBook * feat: populating memo prop in addressbook entry * feat: add explorer link * feat: bug fixing update nickname component * feat: fix proptypes * feat: adding tooltip for copying nickname address * featL fix styling for tx-details page * feat: optimize code for error handling * feat: limiting transaction decoding to tx with data * feat: remove tree UI component * feat: adding request to check for tx decoding supported networks * feat: showing data hex component * feat: fix react warnings * feat: remove extra margin in tx decoding * Remove unused package @truffle/source-map-utils * Ensure messages get translated * feat: link tx-decoding addresses with nicknames * Omit value for boolean attributes * Fix props reading in CopyRawData * fix: fixing issue with transaltion * Fix lint errors in TransactionDecoding - Remove unused import - Reorder imports - Address conflict between caught `error` and error state flag by renaming state flag to `hasError` - Fix requestUrl identifier casing and use of template string - Ensure `useEffect` gets passed the deps it needs - Add scope braces around case statement where it's needed - Omit literal `true` for boolean jsx attribute - Refactor nested ternary as `if` statements * fix: revert fetchWithCache modifications * Fix linting for TransactionListItemDetails - Remove unused import - Fix import spacing - Remove unused prop dereference - Fix string interpolation for translated From/To * Moving to popover pattern * fix: sass color variable * Omit value for boolean attribute * Remove changes from modal.js * fix: refactor nickname popovers * Ensure const gets declared before it's used * Fix linting for ConfirmTransactionBase - Remove unused prop chainId - Stop destructuring an unused field * fix: refactor usage of nicknames popovers in send-content-container * fix: remove extra prop updateAccountNicknameModal * fix: refactor code for address.component * fix: remove extra tooltip * Ensure NicknamePopovers always returns component * Fix linting for NicknamePopover component - Fix useCallback deps - Switch ternary to logical-or * Fix linting for SenderToRecipient ... by fixing import order * Remove unused addressCopied state * Delete empty file * fix: remove sender-to-recipient.container * fix: refactor usage of nickname popovers in confirm-page-container * fix: bug related to state variable * Stylelint fix * Lint fix * Change "Total Amount" to "Total" * Lint fix locales * Update address-book.spec.js * e2e test update * Update e2e tests * Fix issue where absence of function params in data hex tab would result in rendering a string * Fix border radius, and width and height in small notification windows, of the update-nickname-popover * Remove fake await * Clean up * Clean up Co-authored-by: Alaa Hadad <alaahd@Alaas-MacBook-M1-Pro-14-inch.local> Co-authored-by: Dan Miller <danjm.com@gmail.com> Co-authored-by: g. nicholas d'andrea <gnidan@trufflesuite.com>
2021-12-01 18:22:08 +01:00
"browser-util-inspect": "^0.2.0",
"browserify": "^16.5.1",
"chalk": "^4.1.2",
"chokidar": "^3.5.3",
2023-06-22 16:41:03 +02:00
"chromedriver": "^114.0.0",
"concurrently": "^7.6.0",
Use copy-webpack-plugin@6.0.3 (#9197) This updates the `copy-webpack-plugin` to the latest published version, 6.0.3, resolving [a high-severity security advisory][1] with its `serialize-javascript` dependency. [1]: https://www.npmjs.com/advisories/1548 See https://www.npmjs.com/advisories/1548 for more information. The `yarn audit` output: ``` ┌───────────────┬──────────────────────────────────────────────────────────────┐ │ high │ Remote Code Execution │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Package │ serialize-javascript │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Patched in │ >=3.1.0 │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Dependency of │ copy-webpack-plugin │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Path │ copy-webpack-plugin > serialize-javascript │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ More info │ https://www.npmjs.com/advisories/1548 │ └───────────────┴──────────────────────────────────────────────────────────────┘ ``` The relevant [`v6.0.0`][2] breaking changes: - minimum supported Node.js version is 10.13 - ✅ We use 10.18.1 locally and on CI - the plugin now accepts an object, you should change `new CopyPlugin(patterns, options)` to `new CopyPlugin({ patterns, options })` - ✅ Updated `.storybook/webpack.config.js` [2]:https://github.com/webpack-contrib/copy-webpack-plugin/releases/tag/v6.0.0
2020-08-13 02:32:40 +02:00
"copy-webpack-plugin": "^6.0.3",
"cross-spawn": "^7.0.3",
"css-loader": "^2.1.1",
Version v9.5.0 RC (#10944) * add trezor HD path for ledger wallets (#10616) Co-authored-by: Barry Gitarts <bgitarts@gmail.com> * Replace logic for eth swap token in fetchQuotesAndSetQuoteState with getSwapsEthToken call (#10624) * Ensure permission log will only store JSON-able data (#10524) * remove transactionCategory in favor of more types (#10615) * remove transactionCategory in favor of more types * remove reference to STANDARD in stubs * Removing double click bug from delete custom network modal (#10628) Fixes MetaMask/metamask-extension#10626 * Hide zero balance tokens at useTokenTracker layer (#10630) * Setting balance to 0x0 when the original value is undefined (#10634) * fix: speedup cancellation (#10579) fixes #7305 * no more node:console (#10640) * prefer chainId over networkId in most cases (#10594) * Move swaps constants to the shared constants directory (#10614) * Position the 3dot menu in the same spot on asset screen and home screen (#10642) * Ensure swaps detail height doesn't create jump in vertical height (#10644) * Fix: ETH 'token' now only appears once in the swaps to and from dropdowns. (#10650) * Prevent network menu highlighting (#10643) * Allow TextField to receive min and max attributes (#10656) * colocate tests in flat structure (#10655) * Fixing migration script generation paths (#10664) * Improve specificity of `test:unit:lax` npm script (#10661) The unit test npm script `test:unit:lax` is now more specific about which tests files to exclude. An `--ignore` CLI option is used to specify the files to ignore, rather than using the braces glob syntax to ignore them from the target glob itself. This makes the option easier to update going forward as we move more tests into the "strict" group, because the options are exactly the same between the two scripts. It also ensures we don't accidentally exclude other subdirectories that happen to also be named `permissions`. In trying to implement this, I stumbled at first because mocha expects the ignore pattern to be a relative path if the target is a relative path (i.e. they need to both start with `./` or neither). The script `test:unit:strict` has been updated to use a relative target pattern for consistency. * Swaps support for local testnet (#10658) * Swaps support for local testnet * Create util method for comparison of token addresses/symbols to default swaps token * Get chainId from txMeta in _trackSwapsMetrics of transaction controller * Add comment to document purpose of getTransactionGroupRecipientAddressFilter * Use isSwapsDefaultTokenSymbol in place of repeated defaultTokenSymbol comparisons in build-quote.js * fix: replace dnode background with JSON-RPC (#10627) fixes #10090 * Don't render faucet row in deposit modal for custom chains (#10674) Fixes MetaMask/metamask-extension#10038 * Change 'Send ETH' title to 'Send' (#10651) * Fixing incorrectly typed token decimal attribute (#10666) * refactor incoming tx controller (#10639) * make migration more safe (#10689) * Adding default properties to NetworkForm (#10682) Fixes MetaMask/metamask-extension#10681 * deps - remove "remotedev-server" (#10687) * deps - remove remotedev-server * Remove stale references from allow-scripts config Any packages that are no longer in the dependency tree have been removed from the `allow-scripts` config. Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Excluding sourcemaps comment in production builds (#10695) * Excluding sourcemaps comment in production builds Fixes MetaMask/metamask-extension#7077 * Fix source map explorer script The source map explorer script now re-adds the source map comment to each file to ensure the source map visualization still works. Each module with a sourcemap is copied to a temporary directory along with the module it corresponds to, and from there it's passed into `source-map-explorer`. This should ensure the resulting visualization matches what it was before. Everything has been moved inside of functions to generally improve readability, and to allow the use of local variables. Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Delete setupFetchDebugging.js (#10636) * Delete setupFetchDebugging.js * remove fetch-debugging (now handled corrently by sentry) * resolve issue with missing template error (#10692) * resolve issue with missing template error * also apply filtering to confirmation page * rename variable * Add MetaMask to list of BIP44 HD path examples (#10703) The "BIP44 Standard" HD path option in the Ledger connect flow listed only Trezor as an example. It seemed appropriate to include MetaMask as well, since we use the same path. This helps users who have imported their MetaMask seed phrase onto a Ledger device to discover this option. * Removing hard references to 12 word seed phrases in copy (#10704) Adding translation entry for "Wallet Seed" Fixed label padding issue by adding missing CSS rule * rule out empty string for symbol (#10712) * fix: remove unused `metamask.rpcUrl` from redux state + fix tests to reflect that (#10714) * Fix 10706 - Prevent autocomplete from add token input (#10700) * Fix mismatchedChain typo in custom network approval screen (#10723) * Fix 10562 - Hide the suggested token pane when not on Mainnet or test network (#10702) * Update @metamask/controllers to v6.2.1 (#10701) * Additional swaps network support (#10721) * Add swaps support for bnc chain * Use single default token address in shared/constants/swaps * ci - cache deps before patch-package (#10735) * ci - cache deps before patch-package * ci - bump dep cache number (cache break) * build - refactor build system for easier configuration (#10718) * build - refactor build system for easier configuration of before and after bundle * build - fix dependenciesToBundle option * build - fix bify external options and other config * build - refactor for cleanliness * build - fix minify argument * build - fix sourcemaps setup * scripts - refactor setupBundlerDefaults in anticipation of factor bundles * build - scripts - remove unused pipeline label * build - scripts - make filepath entry optional * build - scripts - rename filepath and filename options to entryFilepath and destFilepath * Update development/build/scripts.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * security - update SES lockdown (#10663) * update ses * build - reference ses directly * deps - unify regenerator-runtime versions on 0.13.7 * patches - apply regenerator-runtime ses compat patch\nhttps://github.com/facebook/regenerator/pull/411 * patches - patch regenerator-runtime for latest ses fix * reduc patch, new lockdown severe override taming * updated redux patch * update redux patch for production * ignore lockdown in lint * deps - bump patch-package just in case * trailing comma * remove ses as dep * fix path for frozen promise * remove js extension in lockdown require * Revert "ignore lockdown in lint" This reverts commit 8cefdc94dd25d7781bb09eed8af36441397676da. * Revert "build - reference ses directly" This reverts commit 30371a377dcdd781c1bf9abe55e9c8ae34da26b5. * deps - update ses * Revert "fix path for frozen promise" This reverts commit 966e4c60921a25befe8ca8dea58313cc25852f72. Co-authored-by: kumavis <aaron@kumavis.me> * Allow 11 characters in symbol for RPC (#10670) * Add error in RPC for zero length symbols * Increase RPC symbol length allowed to 11 * Add RPC tests for new symbol length checks * eth-block-tracker@5.0.1 (#10737) * Ensure swaps gas prices are fetched from the correct chain specific endpoint (#10744) * Ensure swaps gas prices are fetched from the correct chain specific endpoint * Just rely on fetchWithCache to cache swaps gas prices, instead of directly using storage in getSwapsPriceEstimatesLastRetrieved * Empty commit * update @metamask/etherscan-link to v2.0.0 (#10747) * Use correct block explorer name and link in swaps when on custom network (#10743) * Use correct block explorer name and link in swaps when on custom network. * Fix up custom etherscan link code in build-quote.js * Use blockExplorerUrl hostname instead of 'blockExplorerBaseUrl' * Use correct etherscan-link method for token links in build-quote * Create correct token link in build-quote for mainnet AND custom networks * Block explorer url improvements in awaiting-swap.js and build-quote.js * Use swapVerifyTokenExplanation message with substitutable block explorer for all applicable locales * Ensure that block explorer links are not shown in awaiting-swap if no url is available * Add New Zealand Dollar to currency options (#10746) * Ensure that the correct default currency symbols are used for fees on the view quote screen (#10753) * Fix 10517 - Prevent tokens without addresses from being added to token list (#10593) * Updating y18n and netmask to resolve dependency issues (#10765) netmask@1.0.6 -> 2.0.1, y18n@3.2.1 -> 3.2.2, y18n@4.0.0 -> 4.0.1 * Refactor Tx State Manager (#10672) Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Ensure that the approval fee in the swaps custom gas modal is in network specific currency (#10763) * Ensure that priceSlippage fiat amounts are always shown in view-quote.js (#10762) * Use network specific swaps contract address when checking swap contract token approval (#10774) * Build - refactor background process to use html (#10769) * build - declare background as html * build - fill in empty file when a missing file is expected * lint - fix * Update development/build/manifest.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Update development/build/manifest.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * build - fix use of empty file to replace unused js files (#10780) * cache lint results for faster repeat execution (#10773) * eslint perf improvement (#10775) * Improve detection of task process exit (#10776) Our build script waits for the `close` event to determine whether the task has exited. The `exit` event is a better representation of this, because if a stream is shared between multiple processes, the process may exit without the `close` event being emitted. We aren't sharing streams between processes, so this edge case doesn't apply to us. This just seemed like a more suitable event to listen to, since we care about the process exiting not the stream ending. See this description of the `close` event from the Node.js documentation [1]: >The `'close'` event is emitted when the stdio streams of a child >process have been closed. This is distinct from the `'exit'` event, >since multiple processes might share the same stdio streams. And see this description of the `exit` event: >The `'exit'` event is emitted after the child process ends. [1]: https://nodejs.org/docs/latest-v14.x/api/child_process.html#child_process_event_exit * Rewrite changelog script from Bash to JavaScript (#10782) The `auto-changelog` script has been rewritten from Bash to JavaScript. Functionally it should behave identically. * Refactoring ethereum-on.spec.js to use fixtures (#10778) * Remove useless negation (#10787) !contentComponent always evaluates to true * Remove date from changelog release header (#10790) New changelog release headers now omit the date. These headers are added automatically when a new release branch is created, and that rarely ends up being the actual date of the release, so these dates have all been inaccurate anyway. The date will be re-added to the changelog later as part of a new script, after a release has been published. * Remove script for creating master sync PR (#10791) The script responsible for creating the "Sync `master` with `develop`" PR has been removed. We will soon be eliminating the need for a `master` branch altogether, so we don't need this anymore. Also, this script hasn't been running correctly in a long time. We've been creating this PR manually. * Add changelog entries under release candidate header (#10784) Instead of always placing new changelog entries under the "Current Develop Branch" header, the changelog script now places them under the header for the current release if that release has not yet been tagged. This eliminates one manual step from the release process. Relates to #10752 * Prevent duplicate changelog entries (#10786) The changelog update script now prevents duplicate entries from being added. Specifically, it will ensure that if a PR has been referenced already in an entry, it will not add it again. This should prevent it from adding duplicate entries for changes that were cherry-picked into hotfix releases. Note that this duplication prevention only works for entries containing a PR number. We don't have any way to prevent duplicate entries yet in cases where we don't know the associated PR. We will be preventing this possibility entirely pretty soon in some upcoming release automation changes though, so I'm not concerned about this omission. * Set the BSC_CONTRACT_ADDRESS to lowercase (#10800) * only applies rules to the appropriate files (#10788) * upgrade eslint deps (#10789) * Ensure correct primary currency image is displayed on home screen and token list (#10777) * Add release header when updating changelog (#10794) The changelog update script now adds a release header if it doesn't find one already that matches the current release candidate version. * remove node-sass dependency (#10797) * Add support for locators into driver abstraction (#10802) * Update changelog headers and fix dates (#10805) The changelog release header format has been updated to match the "keep a changelog" [1] format. Each header is now the bracketed version number followed by a dash, then the release date in ISO-8601 format. The release dates in each header were also updated to match the date of the corresponding GitHub Release [2]. Many of these dates were incorrect because they were set on the day we created the release candidate, rather than on the day of release. Any changelog release entries without a corresponding GitHub release was left with the date already specified. The three oldest release headers were missing dates. For the first two, I used the date of the version bump commit. For the third, I removed it since no changes were listed anyway, and it represented a range of releases rather than a single one. The `auto-changelog.js` script has been updated to account for this new format as well. [1]: https://keepachangelog.com/en/1.0.0/ [2]: https://github.com/MetaMask/metamask-extension/releases * Update the changelog when creating an RC (#10795) The changelog will now be automatically updated when a release branch is created. A new release header along with changelog entries for any new commits will be added. Note that this changelog will still need to be manually cleaned up, but it's one less manual step at least. The old Bash script for adding a new release header to the changelog has been removed, as that functionality is now built into the changelog update script. A new script has been added to commit any changes made to the manifest and changelog. This step used to happen at the end of the bump manifest version script, but now the changelog update relies upon the manifest version bump happening first, so it needed to be re-ordered. The changes should only be committed on the first run of the branch, as it's contingent upon the manifest changing (due to the version bump). Further changelog updates won't trigger new automatic commits. * Refactoring address-book.spec.js to use fixtures (#10804) * Refactoring send-edit.spec.js to use fixtures (#10792) * Fix _getPermittedAccounts type safety (#10819) * Removing unnecessary params from withFixtures function call. (#10831) * Add links to release headers (#10808) Each release header now includes a link to the range of commits included with that release. These links are at the end of the document, in accordance with the "keep a changelog" [1] format. For the purpose of this changelog, the "previous release" is the most recent release mentioned in the changelogs. The diffs ignore any releases that were omitted from the changelog. This is mainly an issue with older releases, so it seemed acceptable. All releases have been documented for a couple of years now, and will be going forward as well. The name of the "Current Develop Branch" section was changed to "Unreleased" to confirm with "keep a changelog". The `auto-changelog.js` script has been updated to update/add these links whenever adding a new release header as well. [1]: https://keepachangelog.com/en/1.0.0/ * Refactoring permissions.spec.js to use fixtures (#10829) * Add validation for the `fee` property from the `/trades` API response (#10836) * Refactoring signature-request.spec.js to use fixtures (#10820) * use locator abstraction in tests folder (#10833) * Move BSC chain ID, rename some BSC-related vars (#10807) * Add categories to each changelog release (#10837) Each changelog release now has category headers. The standard "keep a changelog" [1] categories are used, along with the addition of "Uncategorized" for any changes that have not yet been categorized. The changelog script has been updated to add this "Uncategorized" header if it isn't already present, and to place any new commits under this header. The changelog has been updated to property categorize each change in recent releases, and to place changes in older releases under the header "Uncategorized". [1]: https://keepachangelog.com/en/1.0.0/ * Remove unused CI script (#10840) This script has not been used since #10795. It is now gone. * Add `--rc` flag to changelog script (#10839) The changelog script now accepts an `--rc` flag to tell it whether to add new changes to `Unreleased` or to the header for the current version. Previously this was inferred from whether the current version matched the most recent tag. However this method only works for the first update. Using a flag simplifies this logic, and makes it possible to manually re-run this for further updates to a release candidate. * Add `--help` flag to changelog script (#10846) The changelog script now accepts a `--help` flag, which prints a help text explaining how the script works and what each flag does. * add abstraction for waitForSelector (#10844) * Adds jest dependency (#10845) * Add Jest * Refactor changelog parsing and generation (#10847) The `auto-changelog.js` script has been refactoring into various different modules. This was done in preparation for migrating this to a separate repository, where it can be used in our libraries as well. Functionally this should act _mostly_ the same way, but there have been some changes. It was difficult to make this a pure refactor because of the strategy used to validate the changelog and ensure each addition remained valid. Instead of being updated in-place, the changelog is now parsed upfront and stored as a "Changelog" instance, which is a new class that was written to allow only valid changes. The new changelog is then stringified and completely overwrites the old one. The parsing had to be much more strict, as any unanticipated content would otherwise be erased unintentionally. This script now also normalizes the formatting of the changelog (though the individual change descriptions are still unformatted). The changelog stringification now accommodates non-linear releases as well. For example, you can now release v1.0.1 *after* v2.0.0, and it will be listed in chronological order while also correctly constructing the `compare` URLs for each release. * Increase default slippage from 2% to 3%, show Advanced Options by default (#10842) * Increase default slippage from 2% to 3%, show Advanced Options by default * Disable opening / closing of Advanced Options on the Swap page * Pre-select previously used slippage value when going back to the Swap page * Fix lint issues * Use a callback for setting up an initial customValue * Migrate unreleased changes in changelog (#10853) When updating the changelog for a release candidate, any unreleased changes are now migrated to the release header. Generally we don't make a habit of adding changes to the changelog prior to creating a release candidate, but if any are there we certainly don't want them duplicated. * @metamask/eslint-config*@6.0.0 (#10858) * @metamask/eslint-config*@6.0.0 * Minor eslintrc reorg * Refactoring threebox.spec.js to use fixtures (#10849) * Adjust renderWithProvider to accommodate redux-less components (#10857) * Jest config (#10855) * Setup jest config * Adjust test for jest. * Adjust lint config * Omit swaps ui folder for unit testing * Omit swaps from test:unit:lax * Add jest.config.js to script files * Restore mocks rather than clearing them. * Update jest config and adjust lint to include subdirs * Convert view-quote-price-difference test to jest * Add jest ci and ci coverage scripts. Add jest unit test to general test command * Add test coverage to ci * Use --ignore flag * Fixup * Add @metamask/eslint-config-jest * Update .eslintrc.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Adds jest-coverage/ Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Add jest-coverage/ to prettierignore (#10865) * Add jest coverage (#10868) * Add jest coverage This will add coverage for any tests ran in jest under the `test:coverage:jest` command, which is currently being used in CI. I set the values to the current test coverage in `ui/app/pages/swaps`. * Lint * Fix crash when adding new changelog release header (#10870) The `auto-changelog.js` script crashes when trying to add a new release header. This bug was introduced in #10847. The cause was a simple misnamed parameter. * Change caching for Swaps APIs from 1 hour to 5 minutes (#10871) * Change caching for the /tokens API from 1 hour to 5 minutes * Use 5 minutes caching for /topAssets and /aggregatorMetadata APIs as well * add key literals to driver (#10854) * Quote globs in prettier scripts (#10867) * use waitForSelector instead of until (#10852) * complete abstraction of until method * response to feedback * Adding recovery phrase video to onboarding process (#10717) * Adding recovery phrase video to onboarding process Adding english subtitles * Support textAlign in Box, converting sidebar to Box * Reduce calls of the `/featureFlag` API (#10859) * Remove periodic calls to the /featureFlag API * Always show the Swap button on the main page * Check if the Swaps feature is enabled, show loading animation while waiting * Reuse an existing useEffect call * Use ‘isFeatureFlagLoaded’ in React’s state, resolve lint issues * Add a watch mode for Jest testing * Add unit tests for Swaps: fetchSwapsLiveness, add /ducks/swaps into Jest testing * Remove Swaps Jest tests from Mocha’s ESLint rules * Ignore Swaps Jest tests while running Mocha, update paths * Increase test coverage to the current max * Fix ESLint issues for Swaps * Enable the Swaps feature by default and after state reset, remove loading screen before seeing Swaps * Update Jest config, fix tests * Update Jest coverage threshold to the current maximum * Update ESLint rule in jest.config.js * Disable the “Review Swap” button if the feature flag hasn’t loaded yet * Update jest threshold * Fix 10036 - Prevent odd localStorage migration error in Firefox (#10884) * Add jest watch mode script (#10869) * Refactoring metamask-responsive-ui.spec.js to use fixtures (#10866) * Handling infura blockage (#10883) * Handling infura blockage * Adding blockage home notification * Updating copy, adding temporary notification dismissal * Addressing review feedback * Using eth_blockNumber method to check Infura availability * Handling network changes in availability check * Use jest to run ui/**/*.test.js (#10885) * upgrade ethereumjs util (#10886) * Swaps: Show a network name dynamically in a tooltip (#10882) * Swaps: Show a network name dynamically in a tooltip * Replace “Ethereum” with “$1”, change “Test” to “Testnet” * Replace 이더리움 with $1 * Translate network names, use ‘Ethereum’ by default if a translation is not available yet * Reorder messages to resolve ESLint issues * Add a snapshot test for the FeeCard component, increase Jest threshold * Enable snapshot testing into external .snap files in ESLint * Add the “networkNameEthereum” key in ko/messages.json, remove default “Ethereum” value * Throw an error if chain ID is not supported by the Swaps feature * Use string literals when calling the `t` fn, * Adding option to set Custom Nonce to Confirm Approve Page (#10595) * Dep Upgrades for Lavamoat Patches (#10902) * dep upgrades * apply more patches * Dep upgrades and patches (#10903) * apply patches * lavamoat dep upgrades * remove lavamoat browserify * Increase Jest unit test coverage for the Swaps feature to ~25% (#10900) * Swaps: Show a network name dynamically in a tooltip * Replace “Ethereum” with “$1”, change “Test” to “Testnet” * Replace 이더리움 with $1 * Translate network names, use ‘Ethereum’ by default if a translation is not available yet * Reorder messages to resolve ESLint issues * Add a snapshot test for the FeeCard component, increase Jest threshold * Enable snapshot testing into external .snap files in ESLint * Add the “networkNameEthereum” key in ko/messages.json, remove default “Ethereum” value * Throw an error if chain ID is not supported by the Swaps feature * Use string literals when calling the `t` fn, * Watch Jest tests silently (no React warnings in terminal, only errors) * Add @testing-library/jest-dom, import it before running Jest tests * Add snapshot testing of Swaps’ React components for happy paths, increase minimum threshold for Jest * Add the test/jest folder for Jest setup and shared functions, use it in Swaps Jest tests * Fix ESLint issues, update linting config * Enable ESLint for .snap files (Jest snapshots), throw an error if a snapshot is bigger than 50 lines * Don’t run lint:fix for .snap files * Move `createProps` outside of `describe` blocks, move store creation inside tests * Use translations instead of keys, update a rendering function to load translations * Make sure all Jest snapshots are shorter than 50 lines (default limit) * Add / update props for Swaps tests * Fix React warnings when running tests for Swaps * Bump @metamask/contract-metadata from 1.23.0 to 1.25.0 (#10899) Bumps [@metamask/contract-metadata](https://github.com/MetaMask/contract-metadata) from 1.23.0 to 1.25.0. - [Release notes](https://github.com/MetaMask/contract-metadata/releases) - [Commits](https://github.com/MetaMask/contract-metadata/compare/v1.23.0...v1.25.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Refactoring from-import-ui.spec.js to use fixtures (#10907) * Fix 10458 - Understand where to get support (#10895) * Add contract address validation for token swaps (#10912) * Fixing ENS input entry in send flow (#10923) * Fixing ENS input entry in send flow Fixes MetaMask/metamask-extension#10691 * removed unnecessary apostrophe * Refactoring incremental-security.spec.js to use fixtures (#10917) * use one segment instance (#10915) * Implement Ledger Live bridge (#10293) * add view account-details menu item to token-options menu (#10932) * add view account-details menu item to token-options menu * add onViewAccountDetails propType * Fix 10609 - Prevent overflow of confirmation page hostname (#10935) * upgrade eth-keyring-controller (#10933) * [Fix] 10365 My Accounts Removal (#10680) * pushing my-accounts removal * removed CONTACT_MY_ACCOUNTS_ROUTE * removed CONTACT_MY_ACCOUNTS_VIEW_ROUTE * removing CONTACT_MY_ACCOUNTS_EDIT_ROUTE * removing CONTACT_MY_ACCOUNTS_EDIT_ROUTE * removed showingMyAccounts dead code * removed more dead code related to isMyAccountsPage * removing more dead code * fixed linting error(s) * removing my-accounts component/folder * added empty contact screen ui * styled empty contact page ui * fixed linting, removed add contacts button, and fixed errors * localized text and centered No Contacts * pushing localized verification and fixed e2e test * added listRoute redirect * added listroute and fixed linting error * Increase Jest unit test coverage for the Swaps feature to ~43% (#10934) * add hamburger menu to eth page (#10938) * add hamburger menu to eth page * change token-options to asset-options, use more direct selector for user address fetch * use token custom icons where possible (#10939) * Whats new popup (#10583) * Add 'What's New' notification popup * Move selectors from shared/notifications into ui/ directory * Use keys for localized message in whats new notifications objects, to ensure notifications will be translated. * Remove unused swaps intro popup locale messages * Fix keys of whats new notification locales * Remove notifications messages and descriptions from comment in shared/notifications * Move notifcationActionFunctions to shared/notifications and make it stateless * Get notification data from constants instead of state in whats-new-popup * Code cleanup * Fix build quote reference to swapsEthToken, broken during rebase * Rename notificationFilters to notificationToExclude to clarify its purpose * Documentation for getSortedNotificationsToShow * Move notification action functions from shared/ to whats-new-popup.js * Stop setting swapsWelcomeMessageHasBeenShown to state in app-state controller * Update e2e tests for whats new popup changes * Updating migration files * Addressing feedback part 1 * Addressing feedback part 2 * Remove unnecessary div in whats-new-popup * Change getNotificationsToExclude to getNotificationsToInclude for use in the getSortedNotificationsToShow selector * Delete intro-popup directory and test files * Lint fix * Add notifiction state to address-entry fixture * Use two separate functions for rendering first and subsequent notifications in the whats-new-popup * Ensure that string literals are passed to t for whats new popup text * Update import-ui fixtures to include notificaiton controller state * Remove unnecessary, accidental change confirm-approve * Remove swaps notification in favour of mobile swaps as first notifcation and TBD 3rd notification * Update whats-new-popup to use intersection observer api to detect if notification has been seen * Add notifications to send-edit and threebox e2e test fixtures * Update ui/app/selectors/selectors.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Update ui/app/selectors/selectors.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Clean up locale code for whats-new-popup notifications * Disconnect observers in whats-new-popup when their callback is first called * Add test case for migration 58 for when the AppStateController does not exist * Rename popover components containerRef to popoverWrapRef * Fix messages.json * Update notification messages and images * Rename popoverWrapRef -> popoverRef in whats-new-popup and popover.component * Only create one observer, and only after images have loaded, in whats-new-popup * Set width and height on whats-new-popup image, instead of setting state on img load * Update ui/app/components/app/whats-new-popup/whats-new-popup.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Code clean up in whats new popup re: notification rendering and action functions * Code cleanup in render notification functions of whats-new-popup * Update ui/app/components/app/whats-new-popup/whats-new-popup.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * lint fix * Update and localize notification dates * Clean up date code in shred/notifications/index.js Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Revert "Implement Ledger Live bridge (#10293)" This reverts commit 15b596ad15f2d569255c39e5e7babc8b7ab700ca. * Version v9.5.0 * Update changelog for v9.5.0 * yarn allow-scripts and yarn lavamoat:auto for Version-v9.5.0 branch * Anchor the Need Help text to the bottom of the expanded page (#10955) * fix transaction sync logic (#10954) * Add backwards compatibility for ETH <-> WETH contract address validation (#10962) * Whats new popup design fixes (#10964) * Remove padding on QR code image * Allow the qr code to be below the description in the whats new popup * Fix size and position of QR code in whats new notification * Add right caret to action links in whats new popup * Clean up placeImageBelowDescription logic * Fix display of whats-new-popup image * Improve spacing and sizing of whats new popup in both full screen and popup view * refactor * Ensure method of adding contact when contacts exist (#10963) * Fixing alignment issue with bottom notification (#10979) * Revert "Adding recovery phrase video to onboarding process (#10717)" This reverts commit 9e918b602655e0e4620ab19a3959a8fc08ec0f47. * Removing recovery video entry from changelog * Remove tests that are only needed for the commit reverted in 68c5defc * Fix dependency vulnerability by upgrading xmlhttprequest-ssl via yarn.lock (#10990) Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Barry Gitarts <bgitarts@gmail.com> Co-authored-by: Dan J Miller <danjm.com@gmail.com> Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com> Co-authored-by: Brad Decker <git@braddecker.dev> Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: David Walsh <davidwalsh83@gmail.com> Co-authored-by: Niranjana Binoy <43930900+NiranjanaBinoy@users.noreply.github.com> Co-authored-by: Shane <jonas.shane@gmail.com> Co-authored-by: gitpurva <47534619+gitpurva@users.noreply.github.com> Co-authored-by: kumavis <kumavis@users.noreply.github.com> Co-authored-by: Etienne Dusseault <etienne.dusseault@gmail.com> Co-authored-by: kumavis <aaron@kumavis.me> Co-authored-by: Grant Bakker <grant@bakker.pw> Co-authored-by: Michael Standen <screaminghawk@gmail.com> Co-authored-by: Muhammet Kara <mrkara@users.noreply.github.com> Co-authored-by: Daniel <80175477+dan437@users.noreply.github.com> Co-authored-by: Thomas Huang <tmashuang@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Thomas <thomas.b.huang@gmail.com> Co-authored-by: Alex Donesky <alex.donesky@consensys.net> Co-authored-by: Austin Akers <austin.akers5@gmail.com> Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
2021-05-05 20:08:59 +02:00
"css-to-xpath": "^0.1.0",
Add TypeScript migration dashboard (#13820) As we convert parts of the codebase to TypeScript, we will want a way to track progress. This commit adds a dashboard which displays all of the files that we wish to convert to TypeScript and which files we've already converted. The list of all possible files to convert is predetermined by walking the dependency graph of each entrypoint the build system uses to compile the extension (the files that the entrypoint imports, the files that the imports import, etc). The list should not need to be regenerated, but you can do it by running: yarn ts-migration:enumerate The dashboard is implemented as a separate React app. The CircleCI configuration has been updated so that when a new commit is pushed, the React app is built and stored in the CircleCI artifacts. When a PR is merged, the built files will be pushed to a separate repo whose sole purpose is to serve the dashboard via GitHub Pages (this is the same way that the Storybook works). All of the app code and script to build the app are self-contained under `development/ts-migration-dashboard`. To build this app yourself, you can run: yarn ts-migration:dashboard:build or if you want to build automatically as you change files, run: yarn ts-migration:dashboard:watch Then open the following file in your browser (there is no server component): development/ts-migration-dashboard/build/index.html Finally, although you shouldn't have to do this, to manually deploy the dashboard once built, you can run: git remote add ts-migration-dashboard git@github.com:MetaMask/metamask-extension-ts-migration-dashboard.git yarn ts-migration:dashboard:deploy
2022-08-09 22:16:08 +02:00
"csstype": "^3.0.11",
"del": "^6.1.1",
Version v10.18.4 RC (#15643) * Version v10.18.4 * Fix default currency symbol for `wallet_addEthereumChain` + improve warnings for data that doesn't match our validation expectations (#15201) * set more appropriate default for ticker symbol when wallet_addEthereumChain is called * throw error to dapp when site suggests network with same chainId but different ticker symbol from already added network, instead of showing error and disabled notification to user * Fix Provider Tracking Metrics (#15082) * fix filetype audit (#15334) * Remove decentralized 4byte function signature registry since it contains incorrect signatures and we can't algorithmically check for best option when 4byte.directory is down (#15300) * remove decentralized 4byte function signature registry since it is griefed and we can't algorithmically check for best option when 4byte is down * add migration * remove nock of on chain registry call in getMethodDataAsync test * remove audit exclusion (#15346) * Updates `eth-lattice-keyring` to v0.10.0 (#15261) This is mainly associated with an update in GridPlus SDK and enables better strategies for fetching calldata decoder data. `eth-lattice-keyring` changes: GridPlus/eth-lattice-keyring@v0.7.3...v0.10.0 `gridplus-sdk` changes (which includes a codebase rewrite): GridPlus/gridplus-sdk@v1.2.3...v2.2.2 * Fix 'block link explorer on custom networks' (#13870) * Created a logic for the 'Add a block explorer URL' Removed unused message Message logic rollback Modified history push operation WIP: Pushing before rebasing Applied requested changes Removed unintenionally added code * Lint fix * Metrics fixed * Stop injecting provider on docs.google.com (#15459) * Fix setting of gasPrice when on non-eip 1559 networks (#15628) * Fix setting of gasPrice when on non-eip 1559 networks * Fix unit tests * Fix logic * Update ui/ducks/send/send.test.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * [GridPlus] Bumps `eth-lattice-keyring` to v0.11.0 (#15490) * [GridPlus] Bumps `gridplus-sdk` to v2.2.4 (#15561) * remove exclusions for mismatched object jsdoc type casing (#15351) * Improve `tokenId` parsing and clean up `useAssetDetails` hook (#15304) * Fix state creation in setupSentryGetStateGlobal (#15635) * filter breadcrumbs for improved clarity while debugging sentry errors (#15639) * Update v10.18.4 changelog (#15645) * Auto generated changelog * Update 10.18.4 changelog * Run lavamoat:auto * Call metrics event for wallet type selection at the right time (#15591) * Fix Sentry in LavaMoat contexts (#15672) Our Sentry setup relies upon application state, but it wasn't able to access it in LavaMoat builds because it's running in a separate Compartment. A patch has been introduced to the LavaMoat runtime to allow the root Compartment to mutate the `rootGlobals` object, which is accessible from outside the compartment as well. This lets us expose application state to our Sentry integration. * Fix Sentry deduplication of events that were never sent (#15677) The Sentry `Dedupe` integration has been filtering out our events, even when they were never sent due to our `beforeSend` handler. It was wrongly identifying them as duplicates because it has no knowledge of `beforeSend` or whether they were actually sent or not. To resolve this, the filtering we were doing in `beforeSend` has been moved to a Sentry integration. This integration is installed ahead of the `Dedupe` integration, so `Dedupe` should never find out about any events that we filter out, and thus will never consider them as sent when they were not. * Replace `lavamoat-runtime.js` patch (#15682) A patch made in #15672 was found to be unnecessary. Instead of setting a `rootGlobals` object upon construction of the root compartment, we are now creating a `sentryHooks` object in the initial top-level compartment. I hadn't realized at the time that the root compartment would inherit all properties of the initial compartment `globalThis`. This accomplishes the same goals as #15672 except without needing a patch. * Update v10.18.4 changelog * Fix lint issues * Update yarn.lock * Update `depcheck` to latest version (#15690) `depcheck` has been updated to the latest version. This version pins `@babel/parser` to v7.16.4 because of unresolved bugs in v7.16.5 that result in `depcheck` failing to parse TypeScript files correctly. We had a Yarn resolution in place to ensure `@babel/parser@7.16.4` was being used already. That resolution is no longer needed so it has been removed. This should resove the issue the dev team has been seeing lately where `yarn` and `yarn-deduplicate` disagree about the state the lockfile should be in. * Update yarn.lock * Update LavaMoat policy * deduplicate * Update LavaMoat build policy Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com> Co-authored-by: Alex Donesky <adonesky@gmail.com> Co-authored-by: Brad Decker <bhdecker84@gmail.com> Co-authored-by: Alex Miller <asmiller1989@gmail.com> Co-authored-by: Filip Sekulic <filip.sekulic@consensys.net> Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com> Co-authored-by: Dan J Miller <danjm.com@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: seaona <54408225+seaona@users.noreply.github.com> Co-authored-by: seaona <mariona@gmx.es> Co-authored-by: PeterYinusa <peter.yinusa@consensys.net>
2022-08-24 20:57:47 +02:00
"depcheck": "^1.4.3",
"dependency-tree": "^10.0.9",
2021-08-02 22:54:34 +02:00
"duplexify": "^4.1.1",
"eslint": "^8.36.0",
2022-07-31 20:26:40 +02:00
"eslint-config-prettier": "^8.5.0",
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
2021-11-02 04:20:31 +01:00
"eslint-import-resolver-node": "^0.3.4",
"eslint-import-resolver-typescript": "^2.5.0",
Version v9.5.0 RC (#10944) * add trezor HD path for ledger wallets (#10616) Co-authored-by: Barry Gitarts <bgitarts@gmail.com> * Replace logic for eth swap token in fetchQuotesAndSetQuoteState with getSwapsEthToken call (#10624) * Ensure permission log will only store JSON-able data (#10524) * remove transactionCategory in favor of more types (#10615) * remove transactionCategory in favor of more types * remove reference to STANDARD in stubs * Removing double click bug from delete custom network modal (#10628) Fixes MetaMask/metamask-extension#10626 * Hide zero balance tokens at useTokenTracker layer (#10630) * Setting balance to 0x0 when the original value is undefined (#10634) * fix: speedup cancellation (#10579) fixes #7305 * no more node:console (#10640) * prefer chainId over networkId in most cases (#10594) * Move swaps constants to the shared constants directory (#10614) * Position the 3dot menu in the same spot on asset screen and home screen (#10642) * Ensure swaps detail height doesn't create jump in vertical height (#10644) * Fix: ETH 'token' now only appears once in the swaps to and from dropdowns. (#10650) * Prevent network menu highlighting (#10643) * Allow TextField to receive min and max attributes (#10656) * colocate tests in flat structure (#10655) * Fixing migration script generation paths (#10664) * Improve specificity of `test:unit:lax` npm script (#10661) The unit test npm script `test:unit:lax` is now more specific about which tests files to exclude. An `--ignore` CLI option is used to specify the files to ignore, rather than using the braces glob syntax to ignore them from the target glob itself. This makes the option easier to update going forward as we move more tests into the "strict" group, because the options are exactly the same between the two scripts. It also ensures we don't accidentally exclude other subdirectories that happen to also be named `permissions`. In trying to implement this, I stumbled at first because mocha expects the ignore pattern to be a relative path if the target is a relative path (i.e. they need to both start with `./` or neither). The script `test:unit:strict` has been updated to use a relative target pattern for consistency. * Swaps support for local testnet (#10658) * Swaps support for local testnet * Create util method for comparison of token addresses/symbols to default swaps token * Get chainId from txMeta in _trackSwapsMetrics of transaction controller * Add comment to document purpose of getTransactionGroupRecipientAddressFilter * Use isSwapsDefaultTokenSymbol in place of repeated defaultTokenSymbol comparisons in build-quote.js * fix: replace dnode background with JSON-RPC (#10627) fixes #10090 * Don't render faucet row in deposit modal for custom chains (#10674) Fixes MetaMask/metamask-extension#10038 * Change 'Send ETH' title to 'Send' (#10651) * Fixing incorrectly typed token decimal attribute (#10666) * refactor incoming tx controller (#10639) * make migration more safe (#10689) * Adding default properties to NetworkForm (#10682) Fixes MetaMask/metamask-extension#10681 * deps - remove "remotedev-server" (#10687) * deps - remove remotedev-server * Remove stale references from allow-scripts config Any packages that are no longer in the dependency tree have been removed from the `allow-scripts` config. Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Excluding sourcemaps comment in production builds (#10695) * Excluding sourcemaps comment in production builds Fixes MetaMask/metamask-extension#7077 * Fix source map explorer script The source map explorer script now re-adds the source map comment to each file to ensure the source map visualization still works. Each module with a sourcemap is copied to a temporary directory along with the module it corresponds to, and from there it's passed into `source-map-explorer`. This should ensure the resulting visualization matches what it was before. Everything has been moved inside of functions to generally improve readability, and to allow the use of local variables. Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Delete setupFetchDebugging.js (#10636) * Delete setupFetchDebugging.js * remove fetch-debugging (now handled corrently by sentry) * resolve issue with missing template error (#10692) * resolve issue with missing template error * also apply filtering to confirmation page * rename variable * Add MetaMask to list of BIP44 HD path examples (#10703) The "BIP44 Standard" HD path option in the Ledger connect flow listed only Trezor as an example. It seemed appropriate to include MetaMask as well, since we use the same path. This helps users who have imported their MetaMask seed phrase onto a Ledger device to discover this option. * Removing hard references to 12 word seed phrases in copy (#10704) Adding translation entry for "Wallet Seed" Fixed label padding issue by adding missing CSS rule * rule out empty string for symbol (#10712) * fix: remove unused `metamask.rpcUrl` from redux state + fix tests to reflect that (#10714) * Fix 10706 - Prevent autocomplete from add token input (#10700) * Fix mismatchedChain typo in custom network approval screen (#10723) * Fix 10562 - Hide the suggested token pane when not on Mainnet or test network (#10702) * Update @metamask/controllers to v6.2.1 (#10701) * Additional swaps network support (#10721) * Add swaps support for bnc chain * Use single default token address in shared/constants/swaps * ci - cache deps before patch-package (#10735) * ci - cache deps before patch-package * ci - bump dep cache number (cache break) * build - refactor build system for easier configuration (#10718) * build - refactor build system for easier configuration of before and after bundle * build - fix dependenciesToBundle option * build - fix bify external options and other config * build - refactor for cleanliness * build - fix minify argument * build - fix sourcemaps setup * scripts - refactor setupBundlerDefaults in anticipation of factor bundles * build - scripts - remove unused pipeline label * build - scripts - make filepath entry optional * build - scripts - rename filepath and filename options to entryFilepath and destFilepath * Update development/build/scripts.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * security - update SES lockdown (#10663) * update ses * build - reference ses directly * deps - unify regenerator-runtime versions on 0.13.7 * patches - apply regenerator-runtime ses compat patch\nhttps://github.com/facebook/regenerator/pull/411 * patches - patch regenerator-runtime for latest ses fix * reduc patch, new lockdown severe override taming * updated redux patch * update redux patch for production * ignore lockdown in lint * deps - bump patch-package just in case * trailing comma * remove ses as dep * fix path for frozen promise * remove js extension in lockdown require * Revert "ignore lockdown in lint" This reverts commit 8cefdc94dd25d7781bb09eed8af36441397676da. * Revert "build - reference ses directly" This reverts commit 30371a377dcdd781c1bf9abe55e9c8ae34da26b5. * deps - update ses * Revert "fix path for frozen promise" This reverts commit 966e4c60921a25befe8ca8dea58313cc25852f72. Co-authored-by: kumavis <aaron@kumavis.me> * Allow 11 characters in symbol for RPC (#10670) * Add error in RPC for zero length symbols * Increase RPC symbol length allowed to 11 * Add RPC tests for new symbol length checks * eth-block-tracker@5.0.1 (#10737) * Ensure swaps gas prices are fetched from the correct chain specific endpoint (#10744) * Ensure swaps gas prices are fetched from the correct chain specific endpoint * Just rely on fetchWithCache to cache swaps gas prices, instead of directly using storage in getSwapsPriceEstimatesLastRetrieved * Empty commit * update @metamask/etherscan-link to v2.0.0 (#10747) * Use correct block explorer name and link in swaps when on custom network (#10743) * Use correct block explorer name and link in swaps when on custom network. * Fix up custom etherscan link code in build-quote.js * Use blockExplorerUrl hostname instead of 'blockExplorerBaseUrl' * Use correct etherscan-link method for token links in build-quote * Create correct token link in build-quote for mainnet AND custom networks * Block explorer url improvements in awaiting-swap.js and build-quote.js * Use swapVerifyTokenExplanation message with substitutable block explorer for all applicable locales * Ensure that block explorer links are not shown in awaiting-swap if no url is available * Add New Zealand Dollar to currency options (#10746) * Ensure that the correct default currency symbols are used for fees on the view quote screen (#10753) * Fix 10517 - Prevent tokens without addresses from being added to token list (#10593) * Updating y18n and netmask to resolve dependency issues (#10765) netmask@1.0.6 -> 2.0.1, y18n@3.2.1 -> 3.2.2, y18n@4.0.0 -> 4.0.1 * Refactor Tx State Manager (#10672) Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Ensure that the approval fee in the swaps custom gas modal is in network specific currency (#10763) * Ensure that priceSlippage fiat amounts are always shown in view-quote.js (#10762) * Use network specific swaps contract address when checking swap contract token approval (#10774) * Build - refactor background process to use html (#10769) * build - declare background as html * build - fill in empty file when a missing file is expected * lint - fix * Update development/build/manifest.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Update development/build/manifest.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * build - fix use of empty file to replace unused js files (#10780) * cache lint results for faster repeat execution (#10773) * eslint perf improvement (#10775) * Improve detection of task process exit (#10776) Our build script waits for the `close` event to determine whether the task has exited. The `exit` event is a better representation of this, because if a stream is shared between multiple processes, the process may exit without the `close` event being emitted. We aren't sharing streams between processes, so this edge case doesn't apply to us. This just seemed like a more suitable event to listen to, since we care about the process exiting not the stream ending. See this description of the `close` event from the Node.js documentation [1]: >The `'close'` event is emitted when the stdio streams of a child >process have been closed. This is distinct from the `'exit'` event, >since multiple processes might share the same stdio streams. And see this description of the `exit` event: >The `'exit'` event is emitted after the child process ends. [1]: https://nodejs.org/docs/latest-v14.x/api/child_process.html#child_process_event_exit * Rewrite changelog script from Bash to JavaScript (#10782) The `auto-changelog` script has been rewritten from Bash to JavaScript. Functionally it should behave identically. * Refactoring ethereum-on.spec.js to use fixtures (#10778) * Remove useless negation (#10787) !contentComponent always evaluates to true * Remove date from changelog release header (#10790) New changelog release headers now omit the date. These headers are added automatically when a new release branch is created, and that rarely ends up being the actual date of the release, so these dates have all been inaccurate anyway. The date will be re-added to the changelog later as part of a new script, after a release has been published. * Remove script for creating master sync PR (#10791) The script responsible for creating the "Sync `master` with `develop`" PR has been removed. We will soon be eliminating the need for a `master` branch altogether, so we don't need this anymore. Also, this script hasn't been running correctly in a long time. We've been creating this PR manually. * Add changelog entries under release candidate header (#10784) Instead of always placing new changelog entries under the "Current Develop Branch" header, the changelog script now places them under the header for the current release if that release has not yet been tagged. This eliminates one manual step from the release process. Relates to #10752 * Prevent duplicate changelog entries (#10786) The changelog update script now prevents duplicate entries from being added. Specifically, it will ensure that if a PR has been referenced already in an entry, it will not add it again. This should prevent it from adding duplicate entries for changes that were cherry-picked into hotfix releases. Note that this duplication prevention only works for entries containing a PR number. We don't have any way to prevent duplicate entries yet in cases where we don't know the associated PR. We will be preventing this possibility entirely pretty soon in some upcoming release automation changes though, so I'm not concerned about this omission. * Set the BSC_CONTRACT_ADDRESS to lowercase (#10800) * only applies rules to the appropriate files (#10788) * upgrade eslint deps (#10789) * Ensure correct primary currency image is displayed on home screen and token list (#10777) * Add release header when updating changelog (#10794) The changelog update script now adds a release header if it doesn't find one already that matches the current release candidate version. * remove node-sass dependency (#10797) * Add support for locators into driver abstraction (#10802) * Update changelog headers and fix dates (#10805) The changelog release header format has been updated to match the "keep a changelog" [1] format. Each header is now the bracketed version number followed by a dash, then the release date in ISO-8601 format. The release dates in each header were also updated to match the date of the corresponding GitHub Release [2]. Many of these dates were incorrect because they were set on the day we created the release candidate, rather than on the day of release. Any changelog release entries without a corresponding GitHub release was left with the date already specified. The three oldest release headers were missing dates. For the first two, I used the date of the version bump commit. For the third, I removed it since no changes were listed anyway, and it represented a range of releases rather than a single one. The `auto-changelog.js` script has been updated to account for this new format as well. [1]: https://keepachangelog.com/en/1.0.0/ [2]: https://github.com/MetaMask/metamask-extension/releases * Update the changelog when creating an RC (#10795) The changelog will now be automatically updated when a release branch is created. A new release header along with changelog entries for any new commits will be added. Note that this changelog will still need to be manually cleaned up, but it's one less manual step at least. The old Bash script for adding a new release header to the changelog has been removed, as that functionality is now built into the changelog update script. A new script has been added to commit any changes made to the manifest and changelog. This step used to happen at the end of the bump manifest version script, but now the changelog update relies upon the manifest version bump happening first, so it needed to be re-ordered. The changes should only be committed on the first run of the branch, as it's contingent upon the manifest changing (due to the version bump). Further changelog updates won't trigger new automatic commits. * Refactoring address-book.spec.js to use fixtures (#10804) * Refactoring send-edit.spec.js to use fixtures (#10792) * Fix _getPermittedAccounts type safety (#10819) * Removing unnecessary params from withFixtures function call. (#10831) * Add links to release headers (#10808) Each release header now includes a link to the range of commits included with that release. These links are at the end of the document, in accordance with the "keep a changelog" [1] format. For the purpose of this changelog, the "previous release" is the most recent release mentioned in the changelogs. The diffs ignore any releases that were omitted from the changelog. This is mainly an issue with older releases, so it seemed acceptable. All releases have been documented for a couple of years now, and will be going forward as well. The name of the "Current Develop Branch" section was changed to "Unreleased" to confirm with "keep a changelog". The `auto-changelog.js` script has been updated to update/add these links whenever adding a new release header as well. [1]: https://keepachangelog.com/en/1.0.0/ * Refactoring permissions.spec.js to use fixtures (#10829) * Add validation for the `fee` property from the `/trades` API response (#10836) * Refactoring signature-request.spec.js to use fixtures (#10820) * use locator abstraction in tests folder (#10833) * Move BSC chain ID, rename some BSC-related vars (#10807) * Add categories to each changelog release (#10837) Each changelog release now has category headers. The standard "keep a changelog" [1] categories are used, along with the addition of "Uncategorized" for any changes that have not yet been categorized. The changelog script has been updated to add this "Uncategorized" header if it isn't already present, and to place any new commits under this header. The changelog has been updated to property categorize each change in recent releases, and to place changes in older releases under the header "Uncategorized". [1]: https://keepachangelog.com/en/1.0.0/ * Remove unused CI script (#10840) This script has not been used since #10795. It is now gone. * Add `--rc` flag to changelog script (#10839) The changelog script now accepts an `--rc` flag to tell it whether to add new changes to `Unreleased` or to the header for the current version. Previously this was inferred from whether the current version matched the most recent tag. However this method only works for the first update. Using a flag simplifies this logic, and makes it possible to manually re-run this for further updates to a release candidate. * Add `--help` flag to changelog script (#10846) The changelog script now accepts a `--help` flag, which prints a help text explaining how the script works and what each flag does. * add abstraction for waitForSelector (#10844) * Adds jest dependency (#10845) * Add Jest * Refactor changelog parsing and generation (#10847) The `auto-changelog.js` script has been refactoring into various different modules. This was done in preparation for migrating this to a separate repository, where it can be used in our libraries as well. Functionally this should act _mostly_ the same way, but there have been some changes. It was difficult to make this a pure refactor because of the strategy used to validate the changelog and ensure each addition remained valid. Instead of being updated in-place, the changelog is now parsed upfront and stored as a "Changelog" instance, which is a new class that was written to allow only valid changes. The new changelog is then stringified and completely overwrites the old one. The parsing had to be much more strict, as any unanticipated content would otherwise be erased unintentionally. This script now also normalizes the formatting of the changelog (though the individual change descriptions are still unformatted). The changelog stringification now accommodates non-linear releases as well. For example, you can now release v1.0.1 *after* v2.0.0, and it will be listed in chronological order while also correctly constructing the `compare` URLs for each release. * Increase default slippage from 2% to 3%, show Advanced Options by default (#10842) * Increase default slippage from 2% to 3%, show Advanced Options by default * Disable opening / closing of Advanced Options on the Swap page * Pre-select previously used slippage value when going back to the Swap page * Fix lint issues * Use a callback for setting up an initial customValue * Migrate unreleased changes in changelog (#10853) When updating the changelog for a release candidate, any unreleased changes are now migrated to the release header. Generally we don't make a habit of adding changes to the changelog prior to creating a release candidate, but if any are there we certainly don't want them duplicated. * @metamask/eslint-config*@6.0.0 (#10858) * @metamask/eslint-config*@6.0.0 * Minor eslintrc reorg * Refactoring threebox.spec.js to use fixtures (#10849) * Adjust renderWithProvider to accommodate redux-less components (#10857) * Jest config (#10855) * Setup jest config * Adjust test for jest. * Adjust lint config * Omit swaps ui folder for unit testing * Omit swaps from test:unit:lax * Add jest.config.js to script files * Restore mocks rather than clearing them. * Update jest config and adjust lint to include subdirs * Convert view-quote-price-difference test to jest * Add jest ci and ci coverage scripts. Add jest unit test to general test command * Add test coverage to ci * Use --ignore flag * Fixup * Add @metamask/eslint-config-jest * Update .eslintrc.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Adds jest-coverage/ Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Add jest-coverage/ to prettierignore (#10865) * Add jest coverage (#10868) * Add jest coverage This will add coverage for any tests ran in jest under the `test:coverage:jest` command, which is currently being used in CI. I set the values to the current test coverage in `ui/app/pages/swaps`. * Lint * Fix crash when adding new changelog release header (#10870) The `auto-changelog.js` script crashes when trying to add a new release header. This bug was introduced in #10847. The cause was a simple misnamed parameter. * Change caching for Swaps APIs from 1 hour to 5 minutes (#10871) * Change caching for the /tokens API from 1 hour to 5 minutes * Use 5 minutes caching for /topAssets and /aggregatorMetadata APIs as well * add key literals to driver (#10854) * Quote globs in prettier scripts (#10867) * use waitForSelector instead of until (#10852) * complete abstraction of until method * response to feedback * Adding recovery phrase video to onboarding process (#10717) * Adding recovery phrase video to onboarding process Adding english subtitles * Support textAlign in Box, converting sidebar to Box * Reduce calls of the `/featureFlag` API (#10859) * Remove periodic calls to the /featureFlag API * Always show the Swap button on the main page * Check if the Swaps feature is enabled, show loading animation while waiting * Reuse an existing useEffect call * Use ‘isFeatureFlagLoaded’ in React’s state, resolve lint issues * Add a watch mode for Jest testing * Add unit tests for Swaps: fetchSwapsLiveness, add /ducks/swaps into Jest testing * Remove Swaps Jest tests from Mocha’s ESLint rules * Ignore Swaps Jest tests while running Mocha, update paths * Increase test coverage to the current max * Fix ESLint issues for Swaps * Enable the Swaps feature by default and after state reset, remove loading screen before seeing Swaps * Update Jest config, fix tests * Update Jest coverage threshold to the current maximum * Update ESLint rule in jest.config.js * Disable the “Review Swap” button if the feature flag hasn’t loaded yet * Update jest threshold * Fix 10036 - Prevent odd localStorage migration error in Firefox (#10884) * Add jest watch mode script (#10869) * Refactoring metamask-responsive-ui.spec.js to use fixtures (#10866) * Handling infura blockage (#10883) * Handling infura blockage * Adding blockage home notification * Updating copy, adding temporary notification dismissal * Addressing review feedback * Using eth_blockNumber method to check Infura availability * Handling network changes in availability check * Use jest to run ui/**/*.test.js (#10885) * upgrade ethereumjs util (#10886) * Swaps: Show a network name dynamically in a tooltip (#10882) * Swaps: Show a network name dynamically in a tooltip * Replace “Ethereum” with “$1”, change “Test” to “Testnet” * Replace 이더리움 with $1 * Translate network names, use ‘Ethereum’ by default if a translation is not available yet * Reorder messages to resolve ESLint issues * Add a snapshot test for the FeeCard component, increase Jest threshold * Enable snapshot testing into external .snap files in ESLint * Add the “networkNameEthereum” key in ko/messages.json, remove default “Ethereum” value * Throw an error if chain ID is not supported by the Swaps feature * Use string literals when calling the `t` fn, * Adding option to set Custom Nonce to Confirm Approve Page (#10595) * Dep Upgrades for Lavamoat Patches (#10902) * dep upgrades * apply more patches * Dep upgrades and patches (#10903) * apply patches * lavamoat dep upgrades * remove lavamoat browserify * Increase Jest unit test coverage for the Swaps feature to ~25% (#10900) * Swaps: Show a network name dynamically in a tooltip * Replace “Ethereum” with “$1”, change “Test” to “Testnet” * Replace 이더리움 with $1 * Translate network names, use ‘Ethereum’ by default if a translation is not available yet * Reorder messages to resolve ESLint issues * Add a snapshot test for the FeeCard component, increase Jest threshold * Enable snapshot testing into external .snap files in ESLint * Add the “networkNameEthereum” key in ko/messages.json, remove default “Ethereum” value * Throw an error if chain ID is not supported by the Swaps feature * Use string literals when calling the `t` fn, * Watch Jest tests silently (no React warnings in terminal, only errors) * Add @testing-library/jest-dom, import it before running Jest tests * Add snapshot testing of Swaps’ React components for happy paths, increase minimum threshold for Jest * Add the test/jest folder for Jest setup and shared functions, use it in Swaps Jest tests * Fix ESLint issues, update linting config * Enable ESLint for .snap files (Jest snapshots), throw an error if a snapshot is bigger than 50 lines * Don’t run lint:fix for .snap files * Move `createProps` outside of `describe` blocks, move store creation inside tests * Use translations instead of keys, update a rendering function to load translations * Make sure all Jest snapshots are shorter than 50 lines (default limit) * Add / update props for Swaps tests * Fix React warnings when running tests for Swaps * Bump @metamask/contract-metadata from 1.23.0 to 1.25.0 (#10899) Bumps [@metamask/contract-metadata](https://github.com/MetaMask/contract-metadata) from 1.23.0 to 1.25.0. - [Release notes](https://github.com/MetaMask/contract-metadata/releases) - [Commits](https://github.com/MetaMask/contract-metadata/compare/v1.23.0...v1.25.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Refactoring from-import-ui.spec.js to use fixtures (#10907) * Fix 10458 - Understand where to get support (#10895) * Add contract address validation for token swaps (#10912) * Fixing ENS input entry in send flow (#10923) * Fixing ENS input entry in send flow Fixes MetaMask/metamask-extension#10691 * removed unnecessary apostrophe * Refactoring incremental-security.spec.js to use fixtures (#10917) * use one segment instance (#10915) * Implement Ledger Live bridge (#10293) * add view account-details menu item to token-options menu (#10932) * add view account-details menu item to token-options menu * add onViewAccountDetails propType * Fix 10609 - Prevent overflow of confirmation page hostname (#10935) * upgrade eth-keyring-controller (#10933) * [Fix] 10365 My Accounts Removal (#10680) * pushing my-accounts removal * removed CONTACT_MY_ACCOUNTS_ROUTE * removed CONTACT_MY_ACCOUNTS_VIEW_ROUTE * removing CONTACT_MY_ACCOUNTS_EDIT_ROUTE * removing CONTACT_MY_ACCOUNTS_EDIT_ROUTE * removed showingMyAccounts dead code * removed more dead code related to isMyAccountsPage * removing more dead code * fixed linting error(s) * removing my-accounts component/folder * added empty contact screen ui * styled empty contact page ui * fixed linting, removed add contacts button, and fixed errors * localized text and centered No Contacts * pushing localized verification and fixed e2e test * added listRoute redirect * added listroute and fixed linting error * Increase Jest unit test coverage for the Swaps feature to ~43% (#10934) * add hamburger menu to eth page (#10938) * add hamburger menu to eth page * change token-options to asset-options, use more direct selector for user address fetch * use token custom icons where possible (#10939) * Whats new popup (#10583) * Add 'What's New' notification popup * Move selectors from shared/notifications into ui/ directory * Use keys for localized message in whats new notifications objects, to ensure notifications will be translated. * Remove unused swaps intro popup locale messages * Fix keys of whats new notification locales * Remove notifications messages and descriptions from comment in shared/notifications * Move notifcationActionFunctions to shared/notifications and make it stateless * Get notification data from constants instead of state in whats-new-popup * Code cleanup * Fix build quote reference to swapsEthToken, broken during rebase * Rename notificationFilters to notificationToExclude to clarify its purpose * Documentation for getSortedNotificationsToShow * Move notification action functions from shared/ to whats-new-popup.js * Stop setting swapsWelcomeMessageHasBeenShown to state in app-state controller * Update e2e tests for whats new popup changes * Updating migration files * Addressing feedback part 1 * Addressing feedback part 2 * Remove unnecessary div in whats-new-popup * Change getNotificationsToExclude to getNotificationsToInclude for use in the getSortedNotificationsToShow selector * Delete intro-popup directory and test files * Lint fix * Add notifiction state to address-entry fixture * Use two separate functions for rendering first and subsequent notifications in the whats-new-popup * Ensure that string literals are passed to t for whats new popup text * Update import-ui fixtures to include notificaiton controller state * Remove unnecessary, accidental change confirm-approve * Remove swaps notification in favour of mobile swaps as first notifcation and TBD 3rd notification * Update whats-new-popup to use intersection observer api to detect if notification has been seen * Add notifications to send-edit and threebox e2e test fixtures * Update ui/app/selectors/selectors.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Update ui/app/selectors/selectors.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Clean up locale code for whats-new-popup notifications * Disconnect observers in whats-new-popup when their callback is first called * Add test case for migration 58 for when the AppStateController does not exist * Rename popover components containerRef to popoverWrapRef * Fix messages.json * Update notification messages and images * Rename popoverWrapRef -> popoverRef in whats-new-popup and popover.component * Only create one observer, and only after images have loaded, in whats-new-popup * Set width and height on whats-new-popup image, instead of setting state on img load * Update ui/app/components/app/whats-new-popup/whats-new-popup.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Code clean up in whats new popup re: notification rendering and action functions * Code cleanup in render notification functions of whats-new-popup * Update ui/app/components/app/whats-new-popup/whats-new-popup.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * lint fix * Update and localize notification dates * Clean up date code in shred/notifications/index.js Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Revert "Implement Ledger Live bridge (#10293)" This reverts commit 15b596ad15f2d569255c39e5e7babc8b7ab700ca. * Version v9.5.0 * Update changelog for v9.5.0 * yarn allow-scripts and yarn lavamoat:auto for Version-v9.5.0 branch * Anchor the Need Help text to the bottom of the expanded page (#10955) * fix transaction sync logic (#10954) * Add backwards compatibility for ETH <-> WETH contract address validation (#10962) * Whats new popup design fixes (#10964) * Remove padding on QR code image * Allow the qr code to be below the description in the whats new popup * Fix size and position of QR code in whats new notification * Add right caret to action links in whats new popup * Clean up placeImageBelowDescription logic * Fix display of whats-new-popup image * Improve spacing and sizing of whats new popup in both full screen and popup view * refactor * Ensure method of adding contact when contacts exist (#10963) * Fixing alignment issue with bottom notification (#10979) * Revert "Adding recovery phrase video to onboarding process (#10717)" This reverts commit 9e918b602655e0e4620ab19a3959a8fc08ec0f47. * Removing recovery video entry from changelog * Remove tests that are only needed for the commit reverted in 68c5defc * Fix dependency vulnerability by upgrading xmlhttprequest-ssl via yarn.lock (#10990) Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Barry Gitarts <bgitarts@gmail.com> Co-authored-by: Dan J Miller <danjm.com@gmail.com> Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com> Co-authored-by: Brad Decker <git@braddecker.dev> Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: David Walsh <davidwalsh83@gmail.com> Co-authored-by: Niranjana Binoy <43930900+NiranjanaBinoy@users.noreply.github.com> Co-authored-by: Shane <jonas.shane@gmail.com> Co-authored-by: gitpurva <47534619+gitpurva@users.noreply.github.com> Co-authored-by: kumavis <kumavis@users.noreply.github.com> Co-authored-by: Etienne Dusseault <etienne.dusseault@gmail.com> Co-authored-by: kumavis <aaron@kumavis.me> Co-authored-by: Grant Bakker <grant@bakker.pw> Co-authored-by: Michael Standen <screaminghawk@gmail.com> Co-authored-by: Muhammet Kara <mrkara@users.noreply.github.com> Co-authored-by: Daniel <80175477+dan437@users.noreply.github.com> Co-authored-by: Thomas Huang <tmashuang@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Thomas <thomas.b.huang@gmail.com> Co-authored-by: Alex Donesky <alex.donesky@consensys.net> Co-authored-by: Austin Akers <austin.akers5@gmail.com> Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
2021-05-05 20:08:59 +02:00
"eslint-plugin-import": "^2.22.1",
2022-07-26 20:10:51 +02:00
"eslint-plugin-jest": "^26.6.0",
"eslint-plugin-jsdoc": "^39.3.3",
"eslint-plugin-mocha": "^10.1.0",
"eslint-plugin-node": "^11.1.0",
2022-07-31 20:26:40 +02:00
"eslint-plugin-prettier": "^4.2.1",
Version v9.5.0 RC (#10944) * add trezor HD path for ledger wallets (#10616) Co-authored-by: Barry Gitarts <bgitarts@gmail.com> * Replace logic for eth swap token in fetchQuotesAndSetQuoteState with getSwapsEthToken call (#10624) * Ensure permission log will only store JSON-able data (#10524) * remove transactionCategory in favor of more types (#10615) * remove transactionCategory in favor of more types * remove reference to STANDARD in stubs * Removing double click bug from delete custom network modal (#10628) Fixes MetaMask/metamask-extension#10626 * Hide zero balance tokens at useTokenTracker layer (#10630) * Setting balance to 0x0 when the original value is undefined (#10634) * fix: speedup cancellation (#10579) fixes #7305 * no more node:console (#10640) * prefer chainId over networkId in most cases (#10594) * Move swaps constants to the shared constants directory (#10614) * Position the 3dot menu in the same spot on asset screen and home screen (#10642) * Ensure swaps detail height doesn't create jump in vertical height (#10644) * Fix: ETH 'token' now only appears once in the swaps to and from dropdowns. (#10650) * Prevent network menu highlighting (#10643) * Allow TextField to receive min and max attributes (#10656) * colocate tests in flat structure (#10655) * Fixing migration script generation paths (#10664) * Improve specificity of `test:unit:lax` npm script (#10661) The unit test npm script `test:unit:lax` is now more specific about which tests files to exclude. An `--ignore` CLI option is used to specify the files to ignore, rather than using the braces glob syntax to ignore them from the target glob itself. This makes the option easier to update going forward as we move more tests into the "strict" group, because the options are exactly the same between the two scripts. It also ensures we don't accidentally exclude other subdirectories that happen to also be named `permissions`. In trying to implement this, I stumbled at first because mocha expects the ignore pattern to be a relative path if the target is a relative path (i.e. they need to both start with `./` or neither). The script `test:unit:strict` has been updated to use a relative target pattern for consistency. * Swaps support for local testnet (#10658) * Swaps support for local testnet * Create util method for comparison of token addresses/symbols to default swaps token * Get chainId from txMeta in _trackSwapsMetrics of transaction controller * Add comment to document purpose of getTransactionGroupRecipientAddressFilter * Use isSwapsDefaultTokenSymbol in place of repeated defaultTokenSymbol comparisons in build-quote.js * fix: replace dnode background with JSON-RPC (#10627) fixes #10090 * Don't render faucet row in deposit modal for custom chains (#10674) Fixes MetaMask/metamask-extension#10038 * Change 'Send ETH' title to 'Send' (#10651) * Fixing incorrectly typed token decimal attribute (#10666) * refactor incoming tx controller (#10639) * make migration more safe (#10689) * Adding default properties to NetworkForm (#10682) Fixes MetaMask/metamask-extension#10681 * deps - remove "remotedev-server" (#10687) * deps - remove remotedev-server * Remove stale references from allow-scripts config Any packages that are no longer in the dependency tree have been removed from the `allow-scripts` config. Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Excluding sourcemaps comment in production builds (#10695) * Excluding sourcemaps comment in production builds Fixes MetaMask/metamask-extension#7077 * Fix source map explorer script The source map explorer script now re-adds the source map comment to each file to ensure the source map visualization still works. Each module with a sourcemap is copied to a temporary directory along with the module it corresponds to, and from there it's passed into `source-map-explorer`. This should ensure the resulting visualization matches what it was before. Everything has been moved inside of functions to generally improve readability, and to allow the use of local variables. Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Delete setupFetchDebugging.js (#10636) * Delete setupFetchDebugging.js * remove fetch-debugging (now handled corrently by sentry) * resolve issue with missing template error (#10692) * resolve issue with missing template error * also apply filtering to confirmation page * rename variable * Add MetaMask to list of BIP44 HD path examples (#10703) The "BIP44 Standard" HD path option in the Ledger connect flow listed only Trezor as an example. It seemed appropriate to include MetaMask as well, since we use the same path. This helps users who have imported their MetaMask seed phrase onto a Ledger device to discover this option. * Removing hard references to 12 word seed phrases in copy (#10704) Adding translation entry for "Wallet Seed" Fixed label padding issue by adding missing CSS rule * rule out empty string for symbol (#10712) * fix: remove unused `metamask.rpcUrl` from redux state + fix tests to reflect that (#10714) * Fix 10706 - Prevent autocomplete from add token input (#10700) * Fix mismatchedChain typo in custom network approval screen (#10723) * Fix 10562 - Hide the suggested token pane when not on Mainnet or test network (#10702) * Update @metamask/controllers to v6.2.1 (#10701) * Additional swaps network support (#10721) * Add swaps support for bnc chain * Use single default token address in shared/constants/swaps * ci - cache deps before patch-package (#10735) * ci - cache deps before patch-package * ci - bump dep cache number (cache break) * build - refactor build system for easier configuration (#10718) * build - refactor build system for easier configuration of before and after bundle * build - fix dependenciesToBundle option * build - fix bify external options and other config * build - refactor for cleanliness * build - fix minify argument * build - fix sourcemaps setup * scripts - refactor setupBundlerDefaults in anticipation of factor bundles * build - scripts - remove unused pipeline label * build - scripts - make filepath entry optional * build - scripts - rename filepath and filename options to entryFilepath and destFilepath * Update development/build/scripts.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * security - update SES lockdown (#10663) * update ses * build - reference ses directly * deps - unify regenerator-runtime versions on 0.13.7 * patches - apply regenerator-runtime ses compat patch\nhttps://github.com/facebook/regenerator/pull/411 * patches - patch regenerator-runtime for latest ses fix * reduc patch, new lockdown severe override taming * updated redux patch * update redux patch for production * ignore lockdown in lint * deps - bump patch-package just in case * trailing comma * remove ses as dep * fix path for frozen promise * remove js extension in lockdown require * Revert "ignore lockdown in lint" This reverts commit 8cefdc94dd25d7781bb09eed8af36441397676da. * Revert "build - reference ses directly" This reverts commit 30371a377dcdd781c1bf9abe55e9c8ae34da26b5. * deps - update ses * Revert "fix path for frozen promise" This reverts commit 966e4c60921a25befe8ca8dea58313cc25852f72. Co-authored-by: kumavis <aaron@kumavis.me> * Allow 11 characters in symbol for RPC (#10670) * Add error in RPC for zero length symbols * Increase RPC symbol length allowed to 11 * Add RPC tests for new symbol length checks * eth-block-tracker@5.0.1 (#10737) * Ensure swaps gas prices are fetched from the correct chain specific endpoint (#10744) * Ensure swaps gas prices are fetched from the correct chain specific endpoint * Just rely on fetchWithCache to cache swaps gas prices, instead of directly using storage in getSwapsPriceEstimatesLastRetrieved * Empty commit * update @metamask/etherscan-link to v2.0.0 (#10747) * Use correct block explorer name and link in swaps when on custom network (#10743) * Use correct block explorer name and link in swaps when on custom network. * Fix up custom etherscan link code in build-quote.js * Use blockExplorerUrl hostname instead of 'blockExplorerBaseUrl' * Use correct etherscan-link method for token links in build-quote * Create correct token link in build-quote for mainnet AND custom networks * Block explorer url improvements in awaiting-swap.js and build-quote.js * Use swapVerifyTokenExplanation message with substitutable block explorer for all applicable locales * Ensure that block explorer links are not shown in awaiting-swap if no url is available * Add New Zealand Dollar to currency options (#10746) * Ensure that the correct default currency symbols are used for fees on the view quote screen (#10753) * Fix 10517 - Prevent tokens without addresses from being added to token list (#10593) * Updating y18n and netmask to resolve dependency issues (#10765) netmask@1.0.6 -> 2.0.1, y18n@3.2.1 -> 3.2.2, y18n@4.0.0 -> 4.0.1 * Refactor Tx State Manager (#10672) Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Ensure that the approval fee in the swaps custom gas modal is in network specific currency (#10763) * Ensure that priceSlippage fiat amounts are always shown in view-quote.js (#10762) * Use network specific swaps contract address when checking swap contract token approval (#10774) * Build - refactor background process to use html (#10769) * build - declare background as html * build - fill in empty file when a missing file is expected * lint - fix * Update development/build/manifest.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Update development/build/manifest.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * build - fix use of empty file to replace unused js files (#10780) * cache lint results for faster repeat execution (#10773) * eslint perf improvement (#10775) * Improve detection of task process exit (#10776) Our build script waits for the `close` event to determine whether the task has exited. The `exit` event is a better representation of this, because if a stream is shared between multiple processes, the process may exit without the `close` event being emitted. We aren't sharing streams between processes, so this edge case doesn't apply to us. This just seemed like a more suitable event to listen to, since we care about the process exiting not the stream ending. See this description of the `close` event from the Node.js documentation [1]: >The `'close'` event is emitted when the stdio streams of a child >process have been closed. This is distinct from the `'exit'` event, >since multiple processes might share the same stdio streams. And see this description of the `exit` event: >The `'exit'` event is emitted after the child process ends. [1]: https://nodejs.org/docs/latest-v14.x/api/child_process.html#child_process_event_exit * Rewrite changelog script from Bash to JavaScript (#10782) The `auto-changelog` script has been rewritten from Bash to JavaScript. Functionally it should behave identically. * Refactoring ethereum-on.spec.js to use fixtures (#10778) * Remove useless negation (#10787) !contentComponent always evaluates to true * Remove date from changelog release header (#10790) New changelog release headers now omit the date. These headers are added automatically when a new release branch is created, and that rarely ends up being the actual date of the release, so these dates have all been inaccurate anyway. The date will be re-added to the changelog later as part of a new script, after a release has been published. * Remove script for creating master sync PR (#10791) The script responsible for creating the "Sync `master` with `develop`" PR has been removed. We will soon be eliminating the need for a `master` branch altogether, so we don't need this anymore. Also, this script hasn't been running correctly in a long time. We've been creating this PR manually. * Add changelog entries under release candidate header (#10784) Instead of always placing new changelog entries under the "Current Develop Branch" header, the changelog script now places them under the header for the current release if that release has not yet been tagged. This eliminates one manual step from the release process. Relates to #10752 * Prevent duplicate changelog entries (#10786) The changelog update script now prevents duplicate entries from being added. Specifically, it will ensure that if a PR has been referenced already in an entry, it will not add it again. This should prevent it from adding duplicate entries for changes that were cherry-picked into hotfix releases. Note that this duplication prevention only works for entries containing a PR number. We don't have any way to prevent duplicate entries yet in cases where we don't know the associated PR. We will be preventing this possibility entirely pretty soon in some upcoming release automation changes though, so I'm not concerned about this omission. * Set the BSC_CONTRACT_ADDRESS to lowercase (#10800) * only applies rules to the appropriate files (#10788) * upgrade eslint deps (#10789) * Ensure correct primary currency image is displayed on home screen and token list (#10777) * Add release header when updating changelog (#10794) The changelog update script now adds a release header if it doesn't find one already that matches the current release candidate version. * remove node-sass dependency (#10797) * Add support for locators into driver abstraction (#10802) * Update changelog headers and fix dates (#10805) The changelog release header format has been updated to match the "keep a changelog" [1] format. Each header is now the bracketed version number followed by a dash, then the release date in ISO-8601 format. The release dates in each header were also updated to match the date of the corresponding GitHub Release [2]. Many of these dates were incorrect because they were set on the day we created the release candidate, rather than on the day of release. Any changelog release entries without a corresponding GitHub release was left with the date already specified. The three oldest release headers were missing dates. For the first two, I used the date of the version bump commit. For the third, I removed it since no changes were listed anyway, and it represented a range of releases rather than a single one. The `auto-changelog.js` script has been updated to account for this new format as well. [1]: https://keepachangelog.com/en/1.0.0/ [2]: https://github.com/MetaMask/metamask-extension/releases * Update the changelog when creating an RC (#10795) The changelog will now be automatically updated when a release branch is created. A new release header along with changelog entries for any new commits will be added. Note that this changelog will still need to be manually cleaned up, but it's one less manual step at least. The old Bash script for adding a new release header to the changelog has been removed, as that functionality is now built into the changelog update script. A new script has been added to commit any changes made to the manifest and changelog. This step used to happen at the end of the bump manifest version script, but now the changelog update relies upon the manifest version bump happening first, so it needed to be re-ordered. The changes should only be committed on the first run of the branch, as it's contingent upon the manifest changing (due to the version bump). Further changelog updates won't trigger new automatic commits. * Refactoring address-book.spec.js to use fixtures (#10804) * Refactoring send-edit.spec.js to use fixtures (#10792) * Fix _getPermittedAccounts type safety (#10819) * Removing unnecessary params from withFixtures function call. (#10831) * Add links to release headers (#10808) Each release header now includes a link to the range of commits included with that release. These links are at the end of the document, in accordance with the "keep a changelog" [1] format. For the purpose of this changelog, the "previous release" is the most recent release mentioned in the changelogs. The diffs ignore any releases that were omitted from the changelog. This is mainly an issue with older releases, so it seemed acceptable. All releases have been documented for a couple of years now, and will be going forward as well. The name of the "Current Develop Branch" section was changed to "Unreleased" to confirm with "keep a changelog". The `auto-changelog.js` script has been updated to update/add these links whenever adding a new release header as well. [1]: https://keepachangelog.com/en/1.0.0/ * Refactoring permissions.spec.js to use fixtures (#10829) * Add validation for the `fee` property from the `/trades` API response (#10836) * Refactoring signature-request.spec.js to use fixtures (#10820) * use locator abstraction in tests folder (#10833) * Move BSC chain ID, rename some BSC-related vars (#10807) * Add categories to each changelog release (#10837) Each changelog release now has category headers. The standard "keep a changelog" [1] categories are used, along with the addition of "Uncategorized" for any changes that have not yet been categorized. The changelog script has been updated to add this "Uncategorized" header if it isn't already present, and to place any new commits under this header. The changelog has been updated to property categorize each change in recent releases, and to place changes in older releases under the header "Uncategorized". [1]: https://keepachangelog.com/en/1.0.0/ * Remove unused CI script (#10840) This script has not been used since #10795. It is now gone. * Add `--rc` flag to changelog script (#10839) The changelog script now accepts an `--rc` flag to tell it whether to add new changes to `Unreleased` or to the header for the current version. Previously this was inferred from whether the current version matched the most recent tag. However this method only works for the first update. Using a flag simplifies this logic, and makes it possible to manually re-run this for further updates to a release candidate. * Add `--help` flag to changelog script (#10846) The changelog script now accepts a `--help` flag, which prints a help text explaining how the script works and what each flag does. * add abstraction for waitForSelector (#10844) * Adds jest dependency (#10845) * Add Jest * Refactor changelog parsing and generation (#10847) The `auto-changelog.js` script has been refactoring into various different modules. This was done in preparation for migrating this to a separate repository, where it can be used in our libraries as well. Functionally this should act _mostly_ the same way, but there have been some changes. It was difficult to make this a pure refactor because of the strategy used to validate the changelog and ensure each addition remained valid. Instead of being updated in-place, the changelog is now parsed upfront and stored as a "Changelog" instance, which is a new class that was written to allow only valid changes. The new changelog is then stringified and completely overwrites the old one. The parsing had to be much more strict, as any unanticipated content would otherwise be erased unintentionally. This script now also normalizes the formatting of the changelog (though the individual change descriptions are still unformatted). The changelog stringification now accommodates non-linear releases as well. For example, you can now release v1.0.1 *after* v2.0.0, and it will be listed in chronological order while also correctly constructing the `compare` URLs for each release. * Increase default slippage from 2% to 3%, show Advanced Options by default (#10842) * Increase default slippage from 2% to 3%, show Advanced Options by default * Disable opening / closing of Advanced Options on the Swap page * Pre-select previously used slippage value when going back to the Swap page * Fix lint issues * Use a callback for setting up an initial customValue * Migrate unreleased changes in changelog (#10853) When updating the changelog for a release candidate, any unreleased changes are now migrated to the release header. Generally we don't make a habit of adding changes to the changelog prior to creating a release candidate, but if any are there we certainly don't want them duplicated. * @metamask/eslint-config*@6.0.0 (#10858) * @metamask/eslint-config*@6.0.0 * Minor eslintrc reorg * Refactoring threebox.spec.js to use fixtures (#10849) * Adjust renderWithProvider to accommodate redux-less components (#10857) * Jest config (#10855) * Setup jest config * Adjust test for jest. * Adjust lint config * Omit swaps ui folder for unit testing * Omit swaps from test:unit:lax * Add jest.config.js to script files * Restore mocks rather than clearing them. * Update jest config and adjust lint to include subdirs * Convert view-quote-price-difference test to jest * Add jest ci and ci coverage scripts. Add jest unit test to general test command * Add test coverage to ci * Use --ignore flag * Fixup * Add @metamask/eslint-config-jest * Update .eslintrc.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Adds jest-coverage/ Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Add jest-coverage/ to prettierignore (#10865) * Add jest coverage (#10868) * Add jest coverage This will add coverage for any tests ran in jest under the `test:coverage:jest` command, which is currently being used in CI. I set the values to the current test coverage in `ui/app/pages/swaps`. * Lint * Fix crash when adding new changelog release header (#10870) The `auto-changelog.js` script crashes when trying to add a new release header. This bug was introduced in #10847. The cause was a simple misnamed parameter. * Change caching for Swaps APIs from 1 hour to 5 minutes (#10871) * Change caching for the /tokens API from 1 hour to 5 minutes * Use 5 minutes caching for /topAssets and /aggregatorMetadata APIs as well * add key literals to driver (#10854) * Quote globs in prettier scripts (#10867) * use waitForSelector instead of until (#10852) * complete abstraction of until method * response to feedback * Adding recovery phrase video to onboarding process (#10717) * Adding recovery phrase video to onboarding process Adding english subtitles * Support textAlign in Box, converting sidebar to Box * Reduce calls of the `/featureFlag` API (#10859) * Remove periodic calls to the /featureFlag API * Always show the Swap button on the main page * Check if the Swaps feature is enabled, show loading animation while waiting * Reuse an existing useEffect call * Use ‘isFeatureFlagLoaded’ in React’s state, resolve lint issues * Add a watch mode for Jest testing * Add unit tests for Swaps: fetchSwapsLiveness, add /ducks/swaps into Jest testing * Remove Swaps Jest tests from Mocha’s ESLint rules * Ignore Swaps Jest tests while running Mocha, update paths * Increase test coverage to the current max * Fix ESLint issues for Swaps * Enable the Swaps feature by default and after state reset, remove loading screen before seeing Swaps * Update Jest config, fix tests * Update Jest coverage threshold to the current maximum * Update ESLint rule in jest.config.js * Disable the “Review Swap” button if the feature flag hasn’t loaded yet * Update jest threshold * Fix 10036 - Prevent odd localStorage migration error in Firefox (#10884) * Add jest watch mode script (#10869) * Refactoring metamask-responsive-ui.spec.js to use fixtures (#10866) * Handling infura blockage (#10883) * Handling infura blockage * Adding blockage home notification * Updating copy, adding temporary notification dismissal * Addressing review feedback * Using eth_blockNumber method to check Infura availability * Handling network changes in availability check * Use jest to run ui/**/*.test.js (#10885) * upgrade ethereumjs util (#10886) * Swaps: Show a network name dynamically in a tooltip (#10882) * Swaps: Show a network name dynamically in a tooltip * Replace “Ethereum” with “$1”, change “Test” to “Testnet” * Replace 이더리움 with $1 * Translate network names, use ‘Ethereum’ by default if a translation is not available yet * Reorder messages to resolve ESLint issues * Add a snapshot test for the FeeCard component, increase Jest threshold * Enable snapshot testing into external .snap files in ESLint * Add the “networkNameEthereum” key in ko/messages.json, remove default “Ethereum” value * Throw an error if chain ID is not supported by the Swaps feature * Use string literals when calling the `t` fn, * Adding option to set Custom Nonce to Confirm Approve Page (#10595) * Dep Upgrades for Lavamoat Patches (#10902) * dep upgrades * apply more patches * Dep upgrades and patches (#10903) * apply patches * lavamoat dep upgrades * remove lavamoat browserify * Increase Jest unit test coverage for the Swaps feature to ~25% (#10900) * Swaps: Show a network name dynamically in a tooltip * Replace “Ethereum” with “$1”, change “Test” to “Testnet” * Replace 이더리움 with $1 * Translate network names, use ‘Ethereum’ by default if a translation is not available yet * Reorder messages to resolve ESLint issues * Add a snapshot test for the FeeCard component, increase Jest threshold * Enable snapshot testing into external .snap files in ESLint * Add the “networkNameEthereum” key in ko/messages.json, remove default “Ethereum” value * Throw an error if chain ID is not supported by the Swaps feature * Use string literals when calling the `t` fn, * Watch Jest tests silently (no React warnings in terminal, only errors) * Add @testing-library/jest-dom, import it before running Jest tests * Add snapshot testing of Swaps’ React components for happy paths, increase minimum threshold for Jest * Add the test/jest folder for Jest setup and shared functions, use it in Swaps Jest tests * Fix ESLint issues, update linting config * Enable ESLint for .snap files (Jest snapshots), throw an error if a snapshot is bigger than 50 lines * Don’t run lint:fix for .snap files * Move `createProps` outside of `describe` blocks, move store creation inside tests * Use translations instead of keys, update a rendering function to load translations * Make sure all Jest snapshots are shorter than 50 lines (default limit) * Add / update props for Swaps tests * Fix React warnings when running tests for Swaps * Bump @metamask/contract-metadata from 1.23.0 to 1.25.0 (#10899) Bumps [@metamask/contract-metadata](https://github.com/MetaMask/contract-metadata) from 1.23.0 to 1.25.0. - [Release notes](https://github.com/MetaMask/contract-metadata/releases) - [Commits](https://github.com/MetaMask/contract-metadata/compare/v1.23.0...v1.25.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Refactoring from-import-ui.spec.js to use fixtures (#10907) * Fix 10458 - Understand where to get support (#10895) * Add contract address validation for token swaps (#10912) * Fixing ENS input entry in send flow (#10923) * Fixing ENS input entry in send flow Fixes MetaMask/metamask-extension#10691 * removed unnecessary apostrophe * Refactoring incremental-security.spec.js to use fixtures (#10917) * use one segment instance (#10915) * Implement Ledger Live bridge (#10293) * add view account-details menu item to token-options menu (#10932) * add view account-details menu item to token-options menu * add onViewAccountDetails propType * Fix 10609 - Prevent overflow of confirmation page hostname (#10935) * upgrade eth-keyring-controller (#10933) * [Fix] 10365 My Accounts Removal (#10680) * pushing my-accounts removal * removed CONTACT_MY_ACCOUNTS_ROUTE * removed CONTACT_MY_ACCOUNTS_VIEW_ROUTE * removing CONTACT_MY_ACCOUNTS_EDIT_ROUTE * removing CONTACT_MY_ACCOUNTS_EDIT_ROUTE * removed showingMyAccounts dead code * removed more dead code related to isMyAccountsPage * removing more dead code * fixed linting error(s) * removing my-accounts component/folder * added empty contact screen ui * styled empty contact page ui * fixed linting, removed add contacts button, and fixed errors * localized text and centered No Contacts * pushing localized verification and fixed e2e test * added listRoute redirect * added listroute and fixed linting error * Increase Jest unit test coverage for the Swaps feature to ~43% (#10934) * add hamburger menu to eth page (#10938) * add hamburger menu to eth page * change token-options to asset-options, use more direct selector for user address fetch * use token custom icons where possible (#10939) * Whats new popup (#10583) * Add 'What's New' notification popup * Move selectors from shared/notifications into ui/ directory * Use keys for localized message in whats new notifications objects, to ensure notifications will be translated. * Remove unused swaps intro popup locale messages * Fix keys of whats new notification locales * Remove notifications messages and descriptions from comment in shared/notifications * Move notifcationActionFunctions to shared/notifications and make it stateless * Get notification data from constants instead of state in whats-new-popup * Code cleanup * Fix build quote reference to swapsEthToken, broken during rebase * Rename notificationFilters to notificationToExclude to clarify its purpose * Documentation for getSortedNotificationsToShow * Move notification action functions from shared/ to whats-new-popup.js * Stop setting swapsWelcomeMessageHasBeenShown to state in app-state controller * Update e2e tests for whats new popup changes * Updating migration files * Addressing feedback part 1 * Addressing feedback part 2 * Remove unnecessary div in whats-new-popup * Change getNotificationsToExclude to getNotificationsToInclude for use in the getSortedNotificationsToShow selector * Delete intro-popup directory and test files * Lint fix * Add notifiction state to address-entry fixture * Use two separate functions for rendering first and subsequent notifications in the whats-new-popup * Ensure that string literals are passed to t for whats new popup text * Update import-ui fixtures to include notificaiton controller state * Remove unnecessary, accidental change confirm-approve * Remove swaps notification in favour of mobile swaps as first notifcation and TBD 3rd notification * Update whats-new-popup to use intersection observer api to detect if notification has been seen * Add notifications to send-edit and threebox e2e test fixtures * Update ui/app/selectors/selectors.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Update ui/app/selectors/selectors.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Clean up locale code for whats-new-popup notifications * Disconnect observers in whats-new-popup when their callback is first called * Add test case for migration 58 for when the AppStateController does not exist * Rename popover components containerRef to popoverWrapRef * Fix messages.json * Update notification messages and images * Rename popoverWrapRef -> popoverRef in whats-new-popup and popover.component * Only create one observer, and only after images have loaded, in whats-new-popup * Set width and height on whats-new-popup image, instead of setting state on img load * Update ui/app/components/app/whats-new-popup/whats-new-popup.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Code clean up in whats new popup re: notification rendering and action functions * Code cleanup in render notification functions of whats-new-popup * Update ui/app/components/app/whats-new-popup/whats-new-popup.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * lint fix * Update and localize notification dates * Clean up date code in shred/notifications/index.js Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Revert "Implement Ledger Live bridge (#10293)" This reverts commit 15b596ad15f2d569255c39e5e7babc8b7ab700ca. * Version v9.5.0 * Update changelog for v9.5.0 * yarn allow-scripts and yarn lavamoat:auto for Version-v9.5.0 branch * Anchor the Need Help text to the bottom of the expanded page (#10955) * fix transaction sync logic (#10954) * Add backwards compatibility for ETH <-> WETH contract address validation (#10962) * Whats new popup design fixes (#10964) * Remove padding on QR code image * Allow the qr code to be below the description in the whats new popup * Fix size and position of QR code in whats new notification * Add right caret to action links in whats new popup * Clean up placeImageBelowDescription logic * Fix display of whats-new-popup image * Improve spacing and sizing of whats new popup in both full screen and popup view * refactor * Ensure method of adding contact when contacts exist (#10963) * Fixing alignment issue with bottom notification (#10979) * Revert "Adding recovery phrase video to onboarding process (#10717)" This reverts commit 9e918b602655e0e4620ab19a3959a8fc08ec0f47. * Removing recovery video entry from changelog * Remove tests that are only needed for the commit reverted in 68c5defc * Fix dependency vulnerability by upgrading xmlhttprequest-ssl via yarn.lock (#10990) Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Barry Gitarts <bgitarts@gmail.com> Co-authored-by: Dan J Miller <danjm.com@gmail.com> Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com> Co-authored-by: Brad Decker <git@braddecker.dev> Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: David Walsh <davidwalsh83@gmail.com> Co-authored-by: Niranjana Binoy <43930900+NiranjanaBinoy@users.noreply.github.com> Co-authored-by: Shane <jonas.shane@gmail.com> Co-authored-by: gitpurva <47534619+gitpurva@users.noreply.github.com> Co-authored-by: kumavis <kumavis@users.noreply.github.com> Co-authored-by: Etienne Dusseault <etienne.dusseault@gmail.com> Co-authored-by: kumavis <aaron@kumavis.me> Co-authored-by: Grant Bakker <grant@bakker.pw> Co-authored-by: Michael Standen <screaminghawk@gmail.com> Co-authored-by: Muhammet Kara <mrkara@users.noreply.github.com> Co-authored-by: Daniel <80175477+dan437@users.noreply.github.com> Co-authored-by: Thomas Huang <tmashuang@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Thomas <thomas.b.huang@gmail.com> Co-authored-by: Alex Donesky <alex.donesky@consensys.net> Co-authored-by: Austin Akers <austin.akers5@gmail.com> Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
2021-05-05 20:08:59 +02:00
"eslint-plugin-react": "^7.23.1",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-storybook": "^0.6.12",
"fake-indexeddb": "^4.0.1",
"fancy-log": "^1.3.3",
Build system refactor (#8140) * build - start static asset task cleanup * build - simplify manifest tasks * build - refactor + rename some tasks * build - various cleanups * manifest - fix ref from controller * build - drop gulp for simple async tasks * build - breakout gulpfile into multiple files * build - rename some tasks * build - use task fn refs instead of string names * build - bundle all scripts first, except for contentscript * build - improve task timeline * deps - update lock * build - improve task time printout * build/scripts - remove intermediate named task * build - use 'yarn build' for task entry points * build - properly run tasks via runTask for timeline display * development/announcer - fix manifest path + clean * build - lint fix * build - make all defined tasks possible entry points * build/task - properly report errors during task * ci - fix sesify/lavamoat-viz build command * build/scripts - run each bundle in separate processes * lint fix * build - forward childProcess logs to console * build/task - fix parallel/series stream end event * build/scripts refactor contentscript+inpage into a single task * build/static - use the fs for 150x speedup zomg * lint fix * build/static - fix css copy * Update development/build/scripts.js Co-Authored-By: Mark Stacey <markjstacey@gmail.com> * Update development/build/scripts.js Co-Authored-By: Mark Stacey <markjstacey@gmail.com> * Update development/build/index.js Co-Authored-By: Mark Stacey <markjstacey@gmail.com> * deps - remove redundant mkdirp * deps - remove unused pumpify * deps - remove redundant merge-deep * deps - prefer is-stream of isstream * deps - remove clone for lodash.cloneDeep * clean - remove commented code * build/static - use fs.copy + fast-glob instead of linux cp for better platform support * build/manifest - standardize task naming * build/display - clean - remove unused code * bugfix - fix fs.promises import * build - create "clean" as named task for use as entrypoint * build/static - fix for copying dirs * Update development/build/task.js Co-Authored-By: Mark Stacey <markjstacey@gmail.com> * Update development/build/display.js Co-Authored-By: Mark Stacey <markjstacey@gmail.com> * Update development/build/display.js Co-Authored-By: Mark Stacey <markjstacey@gmail.com> * Update development/build/display.js Co-Authored-By: Mark Stacey <markjstacey@gmail.com> * build - use task refs, tasks only return promises not streams, etc * lint fi bad merge + lint * build - one last cleanup + refactor * build - add comments introducing file * build/manifest - fix bug + subtasks dont beed to be named * Update package.json Co-Authored-By: Mark Stacey <markjstacey@gmail.com> * build/task - remove unused fn * Update package.json Co-Authored-By: Mark Stacey <markjstacey@gmail.com> * Update development/build/styles.js Co-Authored-By: Mark Stacey <markjstacey@gmail.com> * Update development/build/styles.js Co-Authored-By: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-03-09 01:55:02 +01:00
"fast-glob": "^3.2.2",
"fs-extra": "^8.1.0",
"ganache": "^v7.0.4",
"geckodriver": "^4.0.4",
"gh-pages": "^5.0.0",
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
2021-11-02 04:20:31 +01:00
"globby": "^11.0.4",
2020-02-04 15:34:21 +01:00
"gulp": "^4.0.2",
2022-11-15 15:40:56 +01:00
"gulp-autoprefixer": "^8.0.0",
"gulp-livereload": "4.0.0",
"gulp-rename": "^2.0.0",
"gulp-rtlcss": "^1.4.0",
"gulp-sass": "^5.1.0",
"gulp-sort": "^2.0.0",
"gulp-sourcemaps": "^3.0.0",
"gulp-stylelint": "^13.0.0",
2019-06-05 20:05:01 +02:00
"gulp-watch": "^5.0.1",
"gulp-zip": "^5.1.0",
"history": "^5.0.0",
"husky": "^8.0.3",
"ini": "^3.0.0",
"istanbul-lib-coverage": "^3.2.0",
"istanbul-lib-report": "^3.0.0",
"istanbul-reports": "^3.1.5",
"jest": "^29.1.2",
"jest-canvas-mock": "^2.3.1",
"jest-environment-jsdom": "^29.1.2",
"js-yaml": "^4.1.0",
devDeps: jsdom@11.12.0->16.7.0 (#19971) * bump parse5; port patch * devDeps: jsdom@11.5.1->16.7.0 - patch-revert https://github.com/jsdom/jsdom/pull/2076 - jsdom's storage-overriding does not play well with test suite usage of localforage: $ yarn test:unit:global ✖ ERROR: TypeError: Cannot set property localStorage of #<Window> which has only a getter at Object.<anonymous> (/app/test/helpers/setup-helper.js:79:32) at Module._compile (node:internal/modules/cjs/loader:1198:14) at Module.m._compile (/app/node_modules/ts-node/src/index.ts:1459:23) at Module._compile (/app/node_modules/pirates/lib/index.js:136:24) at Module._extensions..js (node:internal/modules/cjs/loader:1252:10) at newLoader (/app/node_modules/pirates/lib/index.js:141:7) at Object.require.extensions.<computed> [as .js] (/app/node_modules/ts-node/src/index.ts:1462:12) at Module.load (node:internal/modules/cjs/loader:1076:32) at Function.Module._load (node:internal/modules/cjs/loader:911:12) at Module.require (node:internal/modules/cjs/loader:1100:19) at require (node:internal/modules/cjs/helpers:108:18) at Object.<anonymous> (/app/test/setup.js:4:1) at Module._compile (node:internal/modules/cjs/loader:1198:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) at Module.load (node:internal/modules/cjs/loader:1076:32) at Function.Module._load (node:internal/modules/cjs/loader:911:12) at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29) at ModuleJob.run (node:internal/modules/esm/module_job:193:25) at async Promise.all (index 0) at ESMLoader.import (node:internal/modules/esm/loader:530:24) at importModuleDynamicallyWrapper (node:internal/vm/module:438:15) at formattedImport (/app/node_modules/mocha/lib/nodejs/esm-utils.js:7:14) at exports.requireOrImport (/app/node_modules/mocha/lib/nodejs/esm-utils.js:48:32) at exports.handleRequires (/app/node_modules/mocha/lib/cli/run-helpers.js:94:28) at /app/node_modules/mocha/lib/cli/run.js:353:25 * update lavamoat policies * update lavamoat build policy
2023-07-13 16:06:08 +02:00
"jsdom": "^16.7.0",
2023-02-08 15:34:44 +01:00
"junit-report-merger": "^4.0.0",
"koa": "^2.7.0",
"lavamoat": "^7.1.0",
"lavamoat-browserify": "^15.7.0",
Version v9.5.0 RC (#10944) * add trezor HD path for ledger wallets (#10616) Co-authored-by: Barry Gitarts <bgitarts@gmail.com> * Replace logic for eth swap token in fetchQuotesAndSetQuoteState with getSwapsEthToken call (#10624) * Ensure permission log will only store JSON-able data (#10524) * remove transactionCategory in favor of more types (#10615) * remove transactionCategory in favor of more types * remove reference to STANDARD in stubs * Removing double click bug from delete custom network modal (#10628) Fixes MetaMask/metamask-extension#10626 * Hide zero balance tokens at useTokenTracker layer (#10630) * Setting balance to 0x0 when the original value is undefined (#10634) * fix: speedup cancellation (#10579) fixes #7305 * no more node:console (#10640) * prefer chainId over networkId in most cases (#10594) * Move swaps constants to the shared constants directory (#10614) * Position the 3dot menu in the same spot on asset screen and home screen (#10642) * Ensure swaps detail height doesn't create jump in vertical height (#10644) * Fix: ETH 'token' now only appears once in the swaps to and from dropdowns. (#10650) * Prevent network menu highlighting (#10643) * Allow TextField to receive min and max attributes (#10656) * colocate tests in flat structure (#10655) * Fixing migration script generation paths (#10664) * Improve specificity of `test:unit:lax` npm script (#10661) The unit test npm script `test:unit:lax` is now more specific about which tests files to exclude. An `--ignore` CLI option is used to specify the files to ignore, rather than using the braces glob syntax to ignore them from the target glob itself. This makes the option easier to update going forward as we move more tests into the "strict" group, because the options are exactly the same between the two scripts. It also ensures we don't accidentally exclude other subdirectories that happen to also be named `permissions`. In trying to implement this, I stumbled at first because mocha expects the ignore pattern to be a relative path if the target is a relative path (i.e. they need to both start with `./` or neither). The script `test:unit:strict` has been updated to use a relative target pattern for consistency. * Swaps support for local testnet (#10658) * Swaps support for local testnet * Create util method for comparison of token addresses/symbols to default swaps token * Get chainId from txMeta in _trackSwapsMetrics of transaction controller * Add comment to document purpose of getTransactionGroupRecipientAddressFilter * Use isSwapsDefaultTokenSymbol in place of repeated defaultTokenSymbol comparisons in build-quote.js * fix: replace dnode background with JSON-RPC (#10627) fixes #10090 * Don't render faucet row in deposit modal for custom chains (#10674) Fixes MetaMask/metamask-extension#10038 * Change 'Send ETH' title to 'Send' (#10651) * Fixing incorrectly typed token decimal attribute (#10666) * refactor incoming tx controller (#10639) * make migration more safe (#10689) * Adding default properties to NetworkForm (#10682) Fixes MetaMask/metamask-extension#10681 * deps - remove "remotedev-server" (#10687) * deps - remove remotedev-server * Remove stale references from allow-scripts config Any packages that are no longer in the dependency tree have been removed from the `allow-scripts` config. Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Excluding sourcemaps comment in production builds (#10695) * Excluding sourcemaps comment in production builds Fixes MetaMask/metamask-extension#7077 * Fix source map explorer script The source map explorer script now re-adds the source map comment to each file to ensure the source map visualization still works. Each module with a sourcemap is copied to a temporary directory along with the module it corresponds to, and from there it's passed into `source-map-explorer`. This should ensure the resulting visualization matches what it was before. Everything has been moved inside of functions to generally improve readability, and to allow the use of local variables. Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Delete setupFetchDebugging.js (#10636) * Delete setupFetchDebugging.js * remove fetch-debugging (now handled corrently by sentry) * resolve issue with missing template error (#10692) * resolve issue with missing template error * also apply filtering to confirmation page * rename variable * Add MetaMask to list of BIP44 HD path examples (#10703) The "BIP44 Standard" HD path option in the Ledger connect flow listed only Trezor as an example. It seemed appropriate to include MetaMask as well, since we use the same path. This helps users who have imported their MetaMask seed phrase onto a Ledger device to discover this option. * Removing hard references to 12 word seed phrases in copy (#10704) Adding translation entry for "Wallet Seed" Fixed label padding issue by adding missing CSS rule * rule out empty string for symbol (#10712) * fix: remove unused `metamask.rpcUrl` from redux state + fix tests to reflect that (#10714) * Fix 10706 - Prevent autocomplete from add token input (#10700) * Fix mismatchedChain typo in custom network approval screen (#10723) * Fix 10562 - Hide the suggested token pane when not on Mainnet or test network (#10702) * Update @metamask/controllers to v6.2.1 (#10701) * Additional swaps network support (#10721) * Add swaps support for bnc chain * Use single default token address in shared/constants/swaps * ci - cache deps before patch-package (#10735) * ci - cache deps before patch-package * ci - bump dep cache number (cache break) * build - refactor build system for easier configuration (#10718) * build - refactor build system for easier configuration of before and after bundle * build - fix dependenciesToBundle option * build - fix bify external options and other config * build - refactor for cleanliness * build - fix minify argument * build - fix sourcemaps setup * scripts - refactor setupBundlerDefaults in anticipation of factor bundles * build - scripts - remove unused pipeline label * build - scripts - make filepath entry optional * build - scripts - rename filepath and filename options to entryFilepath and destFilepath * Update development/build/scripts.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * security - update SES lockdown (#10663) * update ses * build - reference ses directly * deps - unify regenerator-runtime versions on 0.13.7 * patches - apply regenerator-runtime ses compat patch\nhttps://github.com/facebook/regenerator/pull/411 * patches - patch regenerator-runtime for latest ses fix * reduc patch, new lockdown severe override taming * updated redux patch * update redux patch for production * ignore lockdown in lint * deps - bump patch-package just in case * trailing comma * remove ses as dep * fix path for frozen promise * remove js extension in lockdown require * Revert "ignore lockdown in lint" This reverts commit 8cefdc94dd25d7781bb09eed8af36441397676da. * Revert "build - reference ses directly" This reverts commit 30371a377dcdd781c1bf9abe55e9c8ae34da26b5. * deps - update ses * Revert "fix path for frozen promise" This reverts commit 966e4c60921a25befe8ca8dea58313cc25852f72. Co-authored-by: kumavis <aaron@kumavis.me> * Allow 11 characters in symbol for RPC (#10670) * Add error in RPC for zero length symbols * Increase RPC symbol length allowed to 11 * Add RPC tests for new symbol length checks * eth-block-tracker@5.0.1 (#10737) * Ensure swaps gas prices are fetched from the correct chain specific endpoint (#10744) * Ensure swaps gas prices are fetched from the correct chain specific endpoint * Just rely on fetchWithCache to cache swaps gas prices, instead of directly using storage in getSwapsPriceEstimatesLastRetrieved * Empty commit * update @metamask/etherscan-link to v2.0.0 (#10747) * Use correct block explorer name and link in swaps when on custom network (#10743) * Use correct block explorer name and link in swaps when on custom network. * Fix up custom etherscan link code in build-quote.js * Use blockExplorerUrl hostname instead of 'blockExplorerBaseUrl' * Use correct etherscan-link method for token links in build-quote * Create correct token link in build-quote for mainnet AND custom networks * Block explorer url improvements in awaiting-swap.js and build-quote.js * Use swapVerifyTokenExplanation message with substitutable block explorer for all applicable locales * Ensure that block explorer links are not shown in awaiting-swap if no url is available * Add New Zealand Dollar to currency options (#10746) * Ensure that the correct default currency symbols are used for fees on the view quote screen (#10753) * Fix 10517 - Prevent tokens without addresses from being added to token list (#10593) * Updating y18n and netmask to resolve dependency issues (#10765) netmask@1.0.6 -> 2.0.1, y18n@3.2.1 -> 3.2.2, y18n@4.0.0 -> 4.0.1 * Refactor Tx State Manager (#10672) Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Ensure that the approval fee in the swaps custom gas modal is in network specific currency (#10763) * Ensure that priceSlippage fiat amounts are always shown in view-quote.js (#10762) * Use network specific swaps contract address when checking swap contract token approval (#10774) * Build - refactor background process to use html (#10769) * build - declare background as html * build - fill in empty file when a missing file is expected * lint - fix * Update development/build/manifest.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Update development/build/manifest.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * build - fix use of empty file to replace unused js files (#10780) * cache lint results for faster repeat execution (#10773) * eslint perf improvement (#10775) * Improve detection of task process exit (#10776) Our build script waits for the `close` event to determine whether the task has exited. The `exit` event is a better representation of this, because if a stream is shared between multiple processes, the process may exit without the `close` event being emitted. We aren't sharing streams between processes, so this edge case doesn't apply to us. This just seemed like a more suitable event to listen to, since we care about the process exiting not the stream ending. See this description of the `close` event from the Node.js documentation [1]: >The `'close'` event is emitted when the stdio streams of a child >process have been closed. This is distinct from the `'exit'` event, >since multiple processes might share the same stdio streams. And see this description of the `exit` event: >The `'exit'` event is emitted after the child process ends. [1]: https://nodejs.org/docs/latest-v14.x/api/child_process.html#child_process_event_exit * Rewrite changelog script from Bash to JavaScript (#10782) The `auto-changelog` script has been rewritten from Bash to JavaScript. Functionally it should behave identically. * Refactoring ethereum-on.spec.js to use fixtures (#10778) * Remove useless negation (#10787) !contentComponent always evaluates to true * Remove date from changelog release header (#10790) New changelog release headers now omit the date. These headers are added automatically when a new release branch is created, and that rarely ends up being the actual date of the release, so these dates have all been inaccurate anyway. The date will be re-added to the changelog later as part of a new script, after a release has been published. * Remove script for creating master sync PR (#10791) The script responsible for creating the "Sync `master` with `develop`" PR has been removed. We will soon be eliminating the need for a `master` branch altogether, so we don't need this anymore. Also, this script hasn't been running correctly in a long time. We've been creating this PR manually. * Add changelog entries under release candidate header (#10784) Instead of always placing new changelog entries under the "Current Develop Branch" header, the changelog script now places them under the header for the current release if that release has not yet been tagged. This eliminates one manual step from the release process. Relates to #10752 * Prevent duplicate changelog entries (#10786) The changelog update script now prevents duplicate entries from being added. Specifically, it will ensure that if a PR has been referenced already in an entry, it will not add it again. This should prevent it from adding duplicate entries for changes that were cherry-picked into hotfix releases. Note that this duplication prevention only works for entries containing a PR number. We don't have any way to prevent duplicate entries yet in cases where we don't know the associated PR. We will be preventing this possibility entirely pretty soon in some upcoming release automation changes though, so I'm not concerned about this omission. * Set the BSC_CONTRACT_ADDRESS to lowercase (#10800) * only applies rules to the appropriate files (#10788) * upgrade eslint deps (#10789) * Ensure correct primary currency image is displayed on home screen and token list (#10777) * Add release header when updating changelog (#10794) The changelog update script now adds a release header if it doesn't find one already that matches the current release candidate version. * remove node-sass dependency (#10797) * Add support for locators into driver abstraction (#10802) * Update changelog headers and fix dates (#10805) The changelog release header format has been updated to match the "keep a changelog" [1] format. Each header is now the bracketed version number followed by a dash, then the release date in ISO-8601 format. The release dates in each header were also updated to match the date of the corresponding GitHub Release [2]. Many of these dates were incorrect because they were set on the day we created the release candidate, rather than on the day of release. Any changelog release entries without a corresponding GitHub release was left with the date already specified. The three oldest release headers were missing dates. For the first two, I used the date of the version bump commit. For the third, I removed it since no changes were listed anyway, and it represented a range of releases rather than a single one. The `auto-changelog.js` script has been updated to account for this new format as well. [1]: https://keepachangelog.com/en/1.0.0/ [2]: https://github.com/MetaMask/metamask-extension/releases * Update the changelog when creating an RC (#10795) The changelog will now be automatically updated when a release branch is created. A new release header along with changelog entries for any new commits will be added. Note that this changelog will still need to be manually cleaned up, but it's one less manual step at least. The old Bash script for adding a new release header to the changelog has been removed, as that functionality is now built into the changelog update script. A new script has been added to commit any changes made to the manifest and changelog. This step used to happen at the end of the bump manifest version script, but now the changelog update relies upon the manifest version bump happening first, so it needed to be re-ordered. The changes should only be committed on the first run of the branch, as it's contingent upon the manifest changing (due to the version bump). Further changelog updates won't trigger new automatic commits. * Refactoring address-book.spec.js to use fixtures (#10804) * Refactoring send-edit.spec.js to use fixtures (#10792) * Fix _getPermittedAccounts type safety (#10819) * Removing unnecessary params from withFixtures function call. (#10831) * Add links to release headers (#10808) Each release header now includes a link to the range of commits included with that release. These links are at the end of the document, in accordance with the "keep a changelog" [1] format. For the purpose of this changelog, the "previous release" is the most recent release mentioned in the changelogs. The diffs ignore any releases that were omitted from the changelog. This is mainly an issue with older releases, so it seemed acceptable. All releases have been documented for a couple of years now, and will be going forward as well. The name of the "Current Develop Branch" section was changed to "Unreleased" to confirm with "keep a changelog". The `auto-changelog.js` script has been updated to update/add these links whenever adding a new release header as well. [1]: https://keepachangelog.com/en/1.0.0/ * Refactoring permissions.spec.js to use fixtures (#10829) * Add validation for the `fee` property from the `/trades` API response (#10836) * Refactoring signature-request.spec.js to use fixtures (#10820) * use locator abstraction in tests folder (#10833) * Move BSC chain ID, rename some BSC-related vars (#10807) * Add categories to each changelog release (#10837) Each changelog release now has category headers. The standard "keep a changelog" [1] categories are used, along with the addition of "Uncategorized" for any changes that have not yet been categorized. The changelog script has been updated to add this "Uncategorized" header if it isn't already present, and to place any new commits under this header. The changelog has been updated to property categorize each change in recent releases, and to place changes in older releases under the header "Uncategorized". [1]: https://keepachangelog.com/en/1.0.0/ * Remove unused CI script (#10840) This script has not been used since #10795. It is now gone. * Add `--rc` flag to changelog script (#10839) The changelog script now accepts an `--rc` flag to tell it whether to add new changes to `Unreleased` or to the header for the current version. Previously this was inferred from whether the current version matched the most recent tag. However this method only works for the first update. Using a flag simplifies this logic, and makes it possible to manually re-run this for further updates to a release candidate. * Add `--help` flag to changelog script (#10846) The changelog script now accepts a `--help` flag, which prints a help text explaining how the script works and what each flag does. * add abstraction for waitForSelector (#10844) * Adds jest dependency (#10845) * Add Jest * Refactor changelog parsing and generation (#10847) The `auto-changelog.js` script has been refactoring into various different modules. This was done in preparation for migrating this to a separate repository, where it can be used in our libraries as well. Functionally this should act _mostly_ the same way, but there have been some changes. It was difficult to make this a pure refactor because of the strategy used to validate the changelog and ensure each addition remained valid. Instead of being updated in-place, the changelog is now parsed upfront and stored as a "Changelog" instance, which is a new class that was written to allow only valid changes. The new changelog is then stringified and completely overwrites the old one. The parsing had to be much more strict, as any unanticipated content would otherwise be erased unintentionally. This script now also normalizes the formatting of the changelog (though the individual change descriptions are still unformatted). The changelog stringification now accommodates non-linear releases as well. For example, you can now release v1.0.1 *after* v2.0.0, and it will be listed in chronological order while also correctly constructing the `compare` URLs for each release. * Increase default slippage from 2% to 3%, show Advanced Options by default (#10842) * Increase default slippage from 2% to 3%, show Advanced Options by default * Disable opening / closing of Advanced Options on the Swap page * Pre-select previously used slippage value when going back to the Swap page * Fix lint issues * Use a callback for setting up an initial customValue * Migrate unreleased changes in changelog (#10853) When updating the changelog for a release candidate, any unreleased changes are now migrated to the release header. Generally we don't make a habit of adding changes to the changelog prior to creating a release candidate, but if any are there we certainly don't want them duplicated. * @metamask/eslint-config*@6.0.0 (#10858) * @metamask/eslint-config*@6.0.0 * Minor eslintrc reorg * Refactoring threebox.spec.js to use fixtures (#10849) * Adjust renderWithProvider to accommodate redux-less components (#10857) * Jest config (#10855) * Setup jest config * Adjust test for jest. * Adjust lint config * Omit swaps ui folder for unit testing * Omit swaps from test:unit:lax * Add jest.config.js to script files * Restore mocks rather than clearing them. * Update jest config and adjust lint to include subdirs * Convert view-quote-price-difference test to jest * Add jest ci and ci coverage scripts. Add jest unit test to general test command * Add test coverage to ci * Use --ignore flag * Fixup * Add @metamask/eslint-config-jest * Update .eslintrc.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Adds jest-coverage/ Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Add jest-coverage/ to prettierignore (#10865) * Add jest coverage (#10868) * Add jest coverage This will add coverage for any tests ran in jest under the `test:coverage:jest` command, which is currently being used in CI. I set the values to the current test coverage in `ui/app/pages/swaps`. * Lint * Fix crash when adding new changelog release header (#10870) The `auto-changelog.js` script crashes when trying to add a new release header. This bug was introduced in #10847. The cause was a simple misnamed parameter. * Change caching for Swaps APIs from 1 hour to 5 minutes (#10871) * Change caching for the /tokens API from 1 hour to 5 minutes * Use 5 minutes caching for /topAssets and /aggregatorMetadata APIs as well * add key literals to driver (#10854) * Quote globs in prettier scripts (#10867) * use waitForSelector instead of until (#10852) * complete abstraction of until method * response to feedback * Adding recovery phrase video to onboarding process (#10717) * Adding recovery phrase video to onboarding process Adding english subtitles * Support textAlign in Box, converting sidebar to Box * Reduce calls of the `/featureFlag` API (#10859) * Remove periodic calls to the /featureFlag API * Always show the Swap button on the main page * Check if the Swaps feature is enabled, show loading animation while waiting * Reuse an existing useEffect call * Use ‘isFeatureFlagLoaded’ in React’s state, resolve lint issues * Add a watch mode for Jest testing * Add unit tests for Swaps: fetchSwapsLiveness, add /ducks/swaps into Jest testing * Remove Swaps Jest tests from Mocha’s ESLint rules * Ignore Swaps Jest tests while running Mocha, update paths * Increase test coverage to the current max * Fix ESLint issues for Swaps * Enable the Swaps feature by default and after state reset, remove loading screen before seeing Swaps * Update Jest config, fix tests * Update Jest coverage threshold to the current maximum * Update ESLint rule in jest.config.js * Disable the “Review Swap” button if the feature flag hasn’t loaded yet * Update jest threshold * Fix 10036 - Prevent odd localStorage migration error in Firefox (#10884) * Add jest watch mode script (#10869) * Refactoring metamask-responsive-ui.spec.js to use fixtures (#10866) * Handling infura blockage (#10883) * Handling infura blockage * Adding blockage home notification * Updating copy, adding temporary notification dismissal * Addressing review feedback * Using eth_blockNumber method to check Infura availability * Handling network changes in availability check * Use jest to run ui/**/*.test.js (#10885) * upgrade ethereumjs util (#10886) * Swaps: Show a network name dynamically in a tooltip (#10882) * Swaps: Show a network name dynamically in a tooltip * Replace “Ethereum” with “$1”, change “Test” to “Testnet” * Replace 이더리움 with $1 * Translate network names, use ‘Ethereum’ by default if a translation is not available yet * Reorder messages to resolve ESLint issues * Add a snapshot test for the FeeCard component, increase Jest threshold * Enable snapshot testing into external .snap files in ESLint * Add the “networkNameEthereum” key in ko/messages.json, remove default “Ethereum” value * Throw an error if chain ID is not supported by the Swaps feature * Use string literals when calling the `t` fn, * Adding option to set Custom Nonce to Confirm Approve Page (#10595) * Dep Upgrades for Lavamoat Patches (#10902) * dep upgrades * apply more patches * Dep upgrades and patches (#10903) * apply patches * lavamoat dep upgrades * remove lavamoat browserify * Increase Jest unit test coverage for the Swaps feature to ~25% (#10900) * Swaps: Show a network name dynamically in a tooltip * Replace “Ethereum” with “$1”, change “Test” to “Testnet” * Replace 이더리움 with $1 * Translate network names, use ‘Ethereum’ by default if a translation is not available yet * Reorder messages to resolve ESLint issues * Add a snapshot test for the FeeCard component, increase Jest threshold * Enable snapshot testing into external .snap files in ESLint * Add the “networkNameEthereum” key in ko/messages.json, remove default “Ethereum” value * Throw an error if chain ID is not supported by the Swaps feature * Use string literals when calling the `t` fn, * Watch Jest tests silently (no React warnings in terminal, only errors) * Add @testing-library/jest-dom, import it before running Jest tests * Add snapshot testing of Swaps’ React components for happy paths, increase minimum threshold for Jest * Add the test/jest folder for Jest setup and shared functions, use it in Swaps Jest tests * Fix ESLint issues, update linting config * Enable ESLint for .snap files (Jest snapshots), throw an error if a snapshot is bigger than 50 lines * Don’t run lint:fix for .snap files * Move `createProps` outside of `describe` blocks, move store creation inside tests * Use translations instead of keys, update a rendering function to load translations * Make sure all Jest snapshots are shorter than 50 lines (default limit) * Add / update props for Swaps tests * Fix React warnings when running tests for Swaps * Bump @metamask/contract-metadata from 1.23.0 to 1.25.0 (#10899) Bumps [@metamask/contract-metadata](https://github.com/MetaMask/contract-metadata) from 1.23.0 to 1.25.0. - [Release notes](https://github.com/MetaMask/contract-metadata/releases) - [Commits](https://github.com/MetaMask/contract-metadata/compare/v1.23.0...v1.25.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Refactoring from-import-ui.spec.js to use fixtures (#10907) * Fix 10458 - Understand where to get support (#10895) * Add contract address validation for token swaps (#10912) * Fixing ENS input entry in send flow (#10923) * Fixing ENS input entry in send flow Fixes MetaMask/metamask-extension#10691 * removed unnecessary apostrophe * Refactoring incremental-security.spec.js to use fixtures (#10917) * use one segment instance (#10915) * Implement Ledger Live bridge (#10293) * add view account-details menu item to token-options menu (#10932) * add view account-details menu item to token-options menu * add onViewAccountDetails propType * Fix 10609 - Prevent overflow of confirmation page hostname (#10935) * upgrade eth-keyring-controller (#10933) * [Fix] 10365 My Accounts Removal (#10680) * pushing my-accounts removal * removed CONTACT_MY_ACCOUNTS_ROUTE * removed CONTACT_MY_ACCOUNTS_VIEW_ROUTE * removing CONTACT_MY_ACCOUNTS_EDIT_ROUTE * removing CONTACT_MY_ACCOUNTS_EDIT_ROUTE * removed showingMyAccounts dead code * removed more dead code related to isMyAccountsPage * removing more dead code * fixed linting error(s) * removing my-accounts component/folder * added empty contact screen ui * styled empty contact page ui * fixed linting, removed add contacts button, and fixed errors * localized text and centered No Contacts * pushing localized verification and fixed e2e test * added listRoute redirect * added listroute and fixed linting error * Increase Jest unit test coverage for the Swaps feature to ~43% (#10934) * add hamburger menu to eth page (#10938) * add hamburger menu to eth page * change token-options to asset-options, use more direct selector for user address fetch * use token custom icons where possible (#10939) * Whats new popup (#10583) * Add 'What's New' notification popup * Move selectors from shared/notifications into ui/ directory * Use keys for localized message in whats new notifications objects, to ensure notifications will be translated. * Remove unused swaps intro popup locale messages * Fix keys of whats new notification locales * Remove notifications messages and descriptions from comment in shared/notifications * Move notifcationActionFunctions to shared/notifications and make it stateless * Get notification data from constants instead of state in whats-new-popup * Code cleanup * Fix build quote reference to swapsEthToken, broken during rebase * Rename notificationFilters to notificationToExclude to clarify its purpose * Documentation for getSortedNotificationsToShow * Move notification action functions from shared/ to whats-new-popup.js * Stop setting swapsWelcomeMessageHasBeenShown to state in app-state controller * Update e2e tests for whats new popup changes * Updating migration files * Addressing feedback part 1 * Addressing feedback part 2 * Remove unnecessary div in whats-new-popup * Change getNotificationsToExclude to getNotificationsToInclude for use in the getSortedNotificationsToShow selector * Delete intro-popup directory and test files * Lint fix * Add notifiction state to address-entry fixture * Use two separate functions for rendering first and subsequent notifications in the whats-new-popup * Ensure that string literals are passed to t for whats new popup text * Update import-ui fixtures to include notificaiton controller state * Remove unnecessary, accidental change confirm-approve * Remove swaps notification in favour of mobile swaps as first notifcation and TBD 3rd notification * Update whats-new-popup to use intersection observer api to detect if notification has been seen * Add notifications to send-edit and threebox e2e test fixtures * Update ui/app/selectors/selectors.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Update ui/app/selectors/selectors.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Clean up locale code for whats-new-popup notifications * Disconnect observers in whats-new-popup when their callback is first called * Add test case for migration 58 for when the AppStateController does not exist * Rename popover components containerRef to popoverWrapRef * Fix messages.json * Update notification messages and images * Rename popoverWrapRef -> popoverRef in whats-new-popup and popover.component * Only create one observer, and only after images have loaded, in whats-new-popup * Set width and height on whats-new-popup image, instead of setting state on img load * Update ui/app/components/app/whats-new-popup/whats-new-popup.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Code clean up in whats new popup re: notification rendering and action functions * Code cleanup in render notification functions of whats-new-popup * Update ui/app/components/app/whats-new-popup/whats-new-popup.js Co-authored-by: Mark Stacey <markjstacey@gmail.com> * lint fix * Update and localize notification dates * Clean up date code in shred/notifications/index.js Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com> * Revert "Implement Ledger Live bridge (#10293)" This reverts commit 15b596ad15f2d569255c39e5e7babc8b7ab700ca. * Version v9.5.0 * Update changelog for v9.5.0 * yarn allow-scripts and yarn lavamoat:auto for Version-v9.5.0 branch * Anchor the Need Help text to the bottom of the expanded page (#10955) * fix transaction sync logic (#10954) * Add backwards compatibility for ETH <-> WETH contract address validation (#10962) * Whats new popup design fixes (#10964) * Remove padding on QR code image * Allow the qr code to be below the description in the whats new popup * Fix size and position of QR code in whats new notification * Add right caret to action links in whats new popup * Clean up placeImageBelowDescription logic * Fix display of whats-new-popup image * Improve spacing and sizing of whats new popup in both full screen and popup view * refactor * Ensure method of adding contact when contacts exist (#10963) * Fixing alignment issue with bottom notification (#10979) * Revert "Adding recovery phrase video to onboarding process (#10717)" This reverts commit 9e918b602655e0e4620ab19a3959a8fc08ec0f47. * Removing recovery video entry from changelog * Remove tests that are only needed for the commit reverted in 68c5defc * Fix dependency vulnerability by upgrading xmlhttprequest-ssl via yarn.lock (#10990) Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Barry Gitarts <bgitarts@gmail.com> Co-authored-by: Dan J Miller <danjm.com@gmail.com> Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com> Co-authored-by: Brad Decker <git@braddecker.dev> Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: David Walsh <davidwalsh83@gmail.com> Co-authored-by: Niranjana Binoy <43930900+NiranjanaBinoy@users.noreply.github.com> Co-authored-by: Shane <jonas.shane@gmail.com> Co-authored-by: gitpurva <47534619+gitpurva@users.noreply.github.com> Co-authored-by: kumavis <kumavis@users.noreply.github.com> Co-authored-by: Etienne Dusseault <etienne.dusseault@gmail.com> Co-authored-by: kumavis <aaron@kumavis.me> Co-authored-by: Grant Bakker <grant@bakker.pw> Co-authored-by: Michael Standen <screaminghawk@gmail.com> Co-authored-by: Muhammet Kara <mrkara@users.noreply.github.com> Co-authored-by: Daniel <80175477+dan437@users.noreply.github.com> Co-authored-by: Thomas Huang <tmashuang@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Thomas <thomas.b.huang@gmail.com> Co-authored-by: Alex Donesky <alex.donesky@consensys.net> Co-authored-by: Austin Akers <austin.akers5@gmail.com> Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
2021-05-05 20:08:59 +02:00
"lavamoat-viz": "^6.0.9",
"lockfile-lint": "^4.10.6",
Add SES lockdown to extension webapp (#9729) * Freezeglobals: remove Promise freezing, add lockdown * background & UI: temp disable sentry * add loose-envify, dedupe symbol-observable * use loose envify * add symbol-observable patch * run freezeGlobals after sentry init * use require instead of import * add lockdown to contentscript * add error code in message * try increasing node env heap size to 2048 * change back circe CI option * make freezeGlobals an exported function * make freezeGlobals an exported function * use freezeIntrinsics * pass down env to child process * fix unknown module * fix tests * change back to 2048 * fix import error * attempt to fix memory error * fix lint * fix lint * fix mem gain * use lockdown in phishing detect * fix lint * move sentry init into freezeIntrinsics to run lockdown before other imports * lint fix * custom lockdown modules per context * lint fix * fix global test * remove run in child process * remove lavamoat-core, use ses, require lockdown directly * revert childprocess * patch package postinstall * revert back child process * add postinstall to ci * revert node max space size to 1024 * put back loose-envify * Disable sentry to see if e2e tetss pass * use runLockdown, add as script in manifest * remove global and require from runlockdown * add more memory to tests * upgrade resource class for prep-build & prep-build-test * fix lint * lint fix * upgrade remote-redux-devtools * skillfully re-add sentry * lintfix * fix lint * put back beep * remove envify, add loose-envify and patch-package in dev deps * Replace patch with Yarn resolution (#9923) Instead of patching `symbol-observable`, this ensures that all versions of `symbol-observable` are resolved to the given range, even if it contradicts the requested range. Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-11-24 04:26:43 +01:00
"loose-envify": "^1.4.0",
"madge": "^6.1.0",
"mocha": "^9.2.2",
"mockttp": "^2.6.0",
"nock": "^13.2.9",
"node-fetch": "^2.6.1",
"nyc": "^15.0.0",
"playwright": "^1.29.2",
"polyfill-crypto.getrandomvalues": "^1.0.0",
2022-07-31 20:26:40 +02:00
"prettier": "^2.7.1",
"prettier-plugin-sort-json": "^1.0.0",
"proxyquire": "^2.1.3",
Build - refactor for bundle factoring and swappable runtime (#11080) * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * Updating lockfile * lint fix * build/dev - patch watchifys incompatible binary stats output * ui - add comment about conditional import * build - improve comment * Update development/stream-flat-map.js Co-authored-by: Brad Decker <git@braddecker.dev> * Outputting all bundle file links (metamaskbot) Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: Brad Decker <git@braddecker.dev>
2021-07-15 19:59:34 +02:00
"pumpify": "^2.0.1",
Build system refactor (#8140) * build - start static asset task cleanup * build - simplify manifest tasks * build - refactor + rename some tasks * build - various cleanups * manifest - fix ref from controller * build - drop gulp for simple async tasks * build - breakout gulpfile into multiple files * build - rename some tasks * build - use task fn refs instead of string names * build - bundle all scripts first, except for contentscript * build - improve task timeline * deps - update lock * build - improve task time printout * build/scripts - remove intermediate named task * build - use 'yarn build' for task entry points * build - properly run tasks via runTask for timeline display * development/announcer - fix manifest path + clean * build - lint fix * build - make all defined tasks possible entry points * build/task - properly report errors during task * ci - fix sesify/lavamoat-viz build command * build/scripts - run each bundle in separate processes * lint fix * build - forward childProcess logs to console * build/task - fix parallel/series stream end event * build/scripts refactor contentscript+inpage into a single task * build/static - use the fs for 150x speedup zomg * lint fix * build/static - fix css copy * Update development/build/scripts.js Co-Authored-By: Mark Stacey <markjstacey@gmail.com> * Update development/build/scripts.js Co-Authored-By: Mark Stacey <markjstacey@gmail.com> * Update development/build/index.js Co-Authored-By: Mark Stacey <markjstacey@gmail.com> * deps - remove redundant mkdirp * deps - remove unused pumpify * deps - remove redundant merge-deep * deps - prefer is-stream of isstream * deps - remove clone for lodash.cloneDeep * clean - remove commented code * build/static - use fs.copy + fast-glob instead of linux cp for better platform support * build/manifest - standardize task naming * build/display - clean - remove unused code * bugfix - fix fs.promises import * build - create "clean" as named task for use as entrypoint * build/static - fix for copying dirs * Update development/build/task.js Co-Authored-By: Mark Stacey <markjstacey@gmail.com> * Update development/build/display.js Co-Authored-By: Mark Stacey <markjstacey@gmail.com> * Update development/build/display.js Co-Authored-By: Mark Stacey <markjstacey@gmail.com> * Update development/build/display.js Co-Authored-By: Mark Stacey <markjstacey@gmail.com> * build - use task refs, tasks only return promises not streams, etc * lint fi bad merge + lint * build - one last cleanup + refactor * build - add comments introducing file * build/manifest - fix bug + subtasks dont beed to be named * Update package.json Co-Authored-By: Mark Stacey <markjstacey@gmail.com> * build/task - remove unused fn * Update package.json Co-Authored-By: Mark Stacey <markjstacey@gmail.com> * Update development/build/styles.js Co-Authored-By: Mark Stacey <markjstacey@gmail.com> * Update development/build/styles.js Co-Authored-By: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-03-09 01:55:02 +01:00
"randomcolor": "^0.5.4",
Fix 'yarn setup' on M1 Macs (#11887) There are a few issues encountered when running `yarn setup` on new Apple Silicon (aka M1, aka arm64) Macs: * The script halts when attempting to run the install step for the `chromedriver` package with the message "Only Mac 64 bits supported". This is somewhat misleading as it seems to indicate that chromedriver can only be installed on a 64-bit Mac. However, what I think is happening is that the installation script for `chromedriver` is not able to detect that an arm64 CPU *is* a 64-bit CPU. After looking through the `chromedriver` repo, it appears that 87.0.1 is the first version that adds a proper check ([1]). Note that upgrading chromedriver caused the Chrome-specific tests to fail intermittently on CI. I was not able to 100% work out the reason for this, but ensuring that X (which provides a way for Chrome to run in a GUI setting from the command line) is available seems to fix these issues. * The script also halts when attempting to run the install step for the `electron` package. This happens because for the version of `electron` we are using (9.4.2), there is no available binary for arm64. It appears that Electron 11.x was the first version to support arm64 Macs ([2]). This is a bit trickier to resolve because we don't explicitly rely on `electron` — that's brought in by `react-devtools`. The first version of `react-devtools` that relies on `electron` 11.x is 4.11.0 ([3]). [1]: https://github.com/giggio/node-chromedriver/commit/469dd0a6ee23540bfa832b5f09b4cbde3e152010 [2]: https://www.electronjs.org/blog/apple-silicon [3]: https://github.com/facebook/react/blob/main/packages/react-devtools/CHANGELOG.md#4110-april-9-2021
2021-09-01 18:40:40 +02:00
"react-devtools": "^4.11.0",
"react-syntax-highlighter": "^15.5.0",
"read-installed": "^4.0.3",
"redux-mock-store": "^1.5.4",
"remote-redux-devtools": "^0.5.16",
"resolve-url-loader": "^3.1.5",
"sass": "^1.32.4",
"sass-loader": "^10.1.1",
"selenium-webdriver": "^4.9.0",
"semver": "^7.5.4",
Add support for one-click onboarding (#7017) * Add support for one-click onboarding MetaMask now allows sites to register as onboarding the user, so that the user is redirected back to the initiating site after onboarding. This is accomplished through the use of the `metamask-onboarding` library and the MetaMask forwarder. At the end of onboarding, a 'snackbar'-stype component will explain to the user they are about to be moved back to the originating dapp, and it will show the origin of that dapp. This is intended to help prevent phishing attempts, as it highlights that a redirect is taking place to an untrusted third party. If the onboarding initiator tab is closed when onboarding is finished, the user is redirected to the onboarding originator as a fallback. Closes #6161 * Add onboarding button to contract test dapp The `contract-test` dapp (run with `yarn dapp`, used in e2e tests) now uses a `Connect` button instead of connecting automatically. This button also serves as an onboarding button when a MetaMask installation is not detected. * Add new static server for test dapp The `static-server` library we were using for the `contract-test` dapp didn't allow referencing files outside the server root. This should have been possible to work around using symlinks, but there was a bug that resulted in symlinks crashing the server. Instead it has been replaced with a simple static file server that will serve paths starting with `node_modules` from the project root. This will be useful in testing the onboarding library without vendoring it. * Add `@metamask/onboarding` and `@metamask/forwarder` Both libraries used to test onboarding are now included as dev dependencies, to help with testing. A few convenience scripts were added to help with this (`yarn forwarder` and `yarn dapp-forwarder`)
2019-11-22 18:03:51 +01:00
"serve-handler": "^6.1.2",
2020-02-27 05:03:50 +01:00
"sinon": "^9.0.0",
"source-map": "^0.7.2",
"source-map-explorer": "^2.4.2",
"squirrelly": "^9.0.0",
"storybook": "^7.0.11",
"storybook-dark-mode": "^3.0.0",
"stream-browserify": "^3.0.0",
2020-01-29 21:28:08 +01:00
"string.prototype.matchall": "^4.0.2",
"style-loader": "^0.21.0",
"stylelint": "^13.6.1",
"superstruct": "^1.0.3",
Build - refactor for bundle factoring and swappable runtime (#11080) * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * Updating lockfile * lint fix * build/dev - patch watchifys incompatible binary stats output * ui - add comment about conditional import * build - improve comment * Update development/stream-flat-map.js Co-authored-by: Brad Decker <git@braddecker.dev> * Outputting all bundle file links (metamaskbot) Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: Brad Decker <git@braddecker.dev>
2021-07-15 19:59:34 +02:00
"terser": "^5.7.0",
"through2": "^4.0.2",
Add TypeScript migration dashboard (#13820) As we convert parts of the codebase to TypeScript, we will want a way to track progress. This commit adds a dashboard which displays all of the files that we wish to convert to TypeScript and which files we've already converted. The list of all possible files to convert is predetermined by walking the dependency graph of each entrypoint the build system uses to compile the extension (the files that the entrypoint imports, the files that the imports import, etc). The list should not need to be regenerated, but you can do it by running: yarn ts-migration:enumerate The dashboard is implemented as a separate React app. The CircleCI configuration has been updated so that when a new commit is pushed, the React app is built and stored in the CircleCI artifacts. When a PR is merged, the built files will be pushed to a separate repo whose sole purpose is to serve the dashboard via GitHub Pages (this is the same way that the Storybook works). All of the app code and script to build the app are self-contained under `development/ts-migration-dashboard`. To build this app yourself, you can run: yarn ts-migration:dashboard:build or if you want to build automatically as you change files, run: yarn ts-migration:dashboard:watch Then open the following file in your browser (there is no server component): development/ts-migration-dashboard/build/index.html Finally, although you shouldn't have to do this, to manually deploy the dashboard once built, you can run: git remote add ts-migration-dashboard git@github.com:MetaMask/metamask-extension-ts-migration-dashboard.git yarn ts-migration:dashboard:deploy
2022-08-09 22:16:08 +02:00
"ts-node": "^10.5.0",
"ttest": "^2.1.1",
"typescript": "~4.4.0",
"vinyl": "^2.2.1",
2018-01-04 13:40:38 +01:00
"vinyl-buffer": "^1.0.1",
"vinyl-source-stream": "^2.0.0",
Build - refactor for bundle factoring and swappable runtime (#11080) * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * Updating lockfile * lint fix * build/dev - patch watchifys incompatible binary stats output * ui - add comment about conditional import * build - improve comment * Update development/stream-flat-map.js Co-authored-by: Brad Decker <git@braddecker.dev> * Outputting all bundle file links (metamaskbot) Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: Brad Decker <git@braddecker.dev>
2021-07-15 19:59:34 +02:00
"vinyl-sourcemaps-apply": "^0.2.1",
"wait-on": "^7.0.1",
"watchify": "^4.0.0",
"webextension-polyfill": "^0.8.0",
"webpack": "^5.75.0",
"yargs": "^17.0.1"
2015-08-01 03:38:02 +02:00
},
"engines": {
2023-07-31 21:51:39 +02:00
"node": ">= 18",
2023-08-02 00:19:19 +02:00
"yarn": "^4.0.0-rc.48"
},
"lavamoat": {
"allowScripts": {
"@sentry/cli": true,
"chromedriver": true,
"geckodriver": true,
"react-devtools>electron": true,
"@eth-optimism/contracts>@ethersproject/hardware-wallets>@ledgerhq/hw-transport-node-hid>@ledgerhq/hw-transport-node-hid-noevents>node-hid": false,
"@eth-optimism/contracts>@ethersproject/hardware-wallets>@ledgerhq/hw-transport-node-hid>node-hid": false,
"@eth-optimism/contracts>@ethersproject/hardware-wallets>@ledgerhq/hw-transport-node-hid>usb": false,
"@metamask/controllers>web3-provider-engine>ethereumjs-util>keccak": false,
"@metamask/controllers>web3-provider-engine>ethereumjs-util>secp256k1": false,
"@metamask/controllers>web3-provider-engine>ethereumjs-vm>merkle-patricia-tree>ethereumjs-util>keccak": false,
"@metamask/controllers>web3-provider-engine>ethereumjs-vm>merkle-patricia-tree>ethereumjs-util>secp256k1": false,
"@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>keccak": false,
"@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": false,
"@storybook/api>core-js": false,
"@storybook/core>@storybook/core-client>@storybook/ui>core-js-pure": false,
"@storybook/test-runner>@storybook/core-common>esbuild": false,
"eth-json-rpc-filters>eth-json-rpc-middleware>ethereumjs-util>keccak": false,
"eth-json-rpc-filters>eth-json-rpc-middleware>ethereumjs-util>secp256k1": false,
"eth-json-rpc-middleware>eth-sig-util>ethereumjs-util>keccak": false,
"eth-json-rpc-middleware>eth-sig-util>ethereumjs-util>secp256k1": false,
"eth-lattice-keyring>gridplus-sdk": false,
"eth-sig-util>ethereumjs-util>keccak": false,
"eth-sig-util>ethereumjs-util>secp256k1": false,
"eth-trezor-keyring>hdkey>secp256k1": false,
"eth-trezor-keyring>trezor-connect>@trezor/transport>protobufjs": false,
"eth-trezor-keyring>trezor-connect>@trezor/utxo-lib>blake-hash": false,
"eth-trezor-keyring>trezor-connect>@trezor/utxo-lib>tiny-secp256k1": false,
"ethereumjs-util>ethereum-cryptography>keccak": false,
"ethjs-query>babel-runtime>core-js": false,
"ganache>@trufflesuite/bigint-buffer": false,
"ganache>bufferutil": false,
"ganache>keccak": false,
"ganache>leveldown": false,
"ganache>secp256k1": false,
"ganache>utf-8-validate": false,
"ethereumjs-util>ethereum-cryptography>secp256k1": false,
"gulp-watch>chokidar>fsevents": false,
"gulp>glob-watcher>chokidar>fsevents": false,
"webpack>watchpack>watchpack-chokidar2>chokidar>fsevents": false,
"@keystonehq/bc-ur-registry-eth>hdkey>secp256k1": false,
"@metamask/rpc-methods>@metamask/key-tree>secp256k1": false,
"eth-lattice-keyring>gridplus-sdk>secp256k1": false,
"eth-lattice-keyring>secp256k1": false,
"@storybook/react>@pmmmwh/react-refresh-webpack-plugin>core-js-pure": false,
"@testing-library/jest-dom>aria-query>@babel/runtime-corejs3>core-js-pure": false,
"web3": false,
"web3>web3-bzz": false,
"web3>web3-core>web3-core-requestmanager>web3-providers-ws>websocket>bufferutil": false,
"web3>web3-core>web3-core-requestmanager>web3-providers-ws>websocket>es5-ext": false,
"web3>web3-core>web3-core-requestmanager>web3-providers-ws>websocket>utf-8-validate": false,
"web3>web3-shh": false,
"@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>hdkey>secp256k1": false,
"@metamask/base-controller>simple-git-hooks": false,
"@storybook/core>@storybook/core-server>webpack>watchpack>watchpack-chokidar2>chokidar>fsevents": false,
"resolve-url-loader>es6-iterator>es5-ext": false,
"@storybook/test-runner>playwright": true,
"playwright": false,
"@metamask/eth-trezor-keyring>@trezor/connect-web>@trezor/connect>@trezor/transport>protobufjs": false,
"@metamask/eth-trezor-keyring>@trezor/connect-web>@trezor/connect>@trezor/utxo-lib>blake-hash": false,
"@metamask/eth-trezor-keyring>@trezor/connect-web>@trezor/connect>@trezor/utxo-lib>tiny-secp256k1": false,
"@metamask/eth-trezor-keyring>hdkey>secp256k1": false,
"@storybook/addon-knobs>core-js": false,
"@storybook/manager-webpack5>core-js": false,
"@storybook/react-webpack5>@storybook/preset-react-webpack>@pmmmwh/react-refresh-webpack-plugin>core-js-pure": false
}
},
2023-08-02 00:19:19 +02:00
"packageManager": "yarn@4.0.0-rc.48"
2015-08-01 03:38:02 +02:00
}