A Metamask fork with Infura removed and default networks editable
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ciphermask/package.json

360 lines
14 KiB

9 years ago
{
"name": "metamask-crx",
3 years ago
"version": "9.8.0",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/MetaMask/metamask-extension.git"
},
"scripts": {
"setup": "yarn install && yarn setup:postinstall",
"setup:postinstall": "yarn patch-package && yarn allow-scripts",
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>
3 years ago
"start": "yarn build:dev dev",
"start:lavamoat": "yarn build dev",
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>
5 years ago
"dist": "yarn build prod",
"build": "lavamoat development/build/index.js",
"build:dev": "node development/build/index.js",
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>
5 years ago
"start:test": "yarn build testDev",
"benchmark:chrome": "SELENIUM_BROWSER=chrome node test/e2e/benchmark.js",
"benchmark:firefox": "SELENIUM_BROWSER=firefox node test/e2e/benchmark.js",
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>
5 years ago
"build:test": "yarn build test",
"build:test:metrics": "SEGMENT_HOST='http://localhost:9090' SEGMENT_WRITE_KEY='FAKE' SEGMENT_LEGACY_WRITE_KEY='FAKE' yarn build test",
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>
4 years ago
"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`)
5 years ago
"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": "mocha --exit --require test/env.js --require test/setup.js --recursive './app/**/*.test.js'",
"test:unit:global": "mocha --exit --require test/env.js --require test/setup.js --recursive test/unit-global/*.test.js",
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>
4 years ago
"test:unit:jest": "jest",
"test:unit:jest:watch": "jest --watch",
"test:unit:jest:watch:silent": "jest --watch --silent",
"test:unit:jest:ci": "jest --maxWorkers=2",
"test:unit:lax": "mocha --exit --require test/env.js --require test/setup.js --ignore './app/scripts/controllers/permissions/*.test.js' --recursive './app/**/*.test.js'",
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>
4 years ago
"test:unit:strict": "mocha --exit --require test/env.js --require test/setup.js --recursive './app/scripts/controllers/permissions/*.test.js'",
"test:unit:path": "mocha --exit --require test/env.js --require test/setup.js --recursive",
"test:e2e:chrome": "SELENIUM_BROWSER=chrome node test/e2e/run-all.js",
"test:e2e:chrome:metrics": "SELENIUM_BROWSER=chrome node test/e2e/run-e2e-test.js test/e2e/metrics.spec.js",
"test:e2e:firefox": "SELENIUM_BROWSER=firefox node test/e2e/run-all.js",
"test:e2e:firefox:metrics": "SELENIUM_BROWSER=firefox node test/e2e/run-e2e-test.js test/e2e/metrics.spec.js",
"test:coverage": "nyc --silent --check-coverage yarn test:unit:strict && nyc --silent --no-clean yarn test:unit:lax && nyc report --reporter=text --reporter=html",
"test:e2e:single": "node test/e2e/run-e2e-test.js",
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>
4 years ago
"test:coverage:jest": "jest --coverage --maxWorkers=2",
"test:coverage:strict": "nyc --check-coverage yarn test:unit:strict",
"test:coverage:path": "nyc --check-coverage yarn test:unit:path",
"ganache:start": "./development/run-ganache.sh",
"sentry:publish": "node ./development/sentry-publish.js",
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>
4 years ago
"lint": "prettier --check '**/*.json' && eslint . --ext js,snap --cache && yarn lint:styles",
"lint:fix": "prettier --write '**/*.json' && eslint . --ext js --cache --fix",
"lint:changed": "{ git ls-files --others --exclude-standard ; git diff-index --name-only --diff-filter=d HEAD ; } | grep --regexp='[.]js$' | tr '\\n' '\\0' | xargs -0 eslint",
"lint:changed:fix": "{ git ls-files --others --exclude-standard ; git diff-index --name-only --diff-filter=d HEAD ; } | grep --regexp='[.]js$' | tr '\\n' '\\0' | xargs -0 eslint --fix",
"lint:shellcheck": "./development/shellcheck.sh",
4 years ago
"lint:styles": "stylelint '*/**/*.scss'",
"lint:lockfile": "lockfile-lint --path yarn.lock --allowed-hosts npm yarn github.com codeload.github.com --empty-hostname false --allowed-schemes \"https:\" \"git+https:\"",
"validate-source-maps": "node ./development/sourcemap-validator.js",
"verify-locales": "node ./development/verify-locale-strings.js",
"verify-locales:fix": "node ./development/verify-locale-strings.js --fix",
"mozilla-lint": "addons-linter dist/firefox",
"watch": "mocha --watch --require test/env.js --require test/setup.js --reporter min --recursive \"test/unit/**/*.js\" \"ui/**/*.test.js\"",
"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.
5 years ago
"start:dev": "concurrently -k -n build,react,redux yarn:start yarn:devtools:react yarn:devtools:redux",
"announce": "node development/announcer.js",
"storybook": "start-storybook -p 6006 -c .storybook --static-dir ./app ./storybook/images",
"storybook:build": "build-storybook -c .storybook -o storybook-build --static-dir ./app ./storybook/images",
"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:auto": "lavamoat ./development/build/index.js --writeAutoPolicy",
"lavamoat:debug": "lavamoat ./development/build/index.js --writeAutoPolicyDebug"
},
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
5 years ago
"resolutions": {
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>
4 years ago
"**/regenerator-runtime": "^0.13.7",
"**/configstore/dot-prop": "^5.1.1",
"**/ethers/elliptic": "^6.5.4",
"**/knex/minimist": "^1.2.5",
"**/optimist/minimist": "^1.2.5",
"**/socketcluster/minimist": "^1.2.5",
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>
4 years ago
"**/redux/symbol-observable": "^2.0.3",
"**/redux-devtools-instrument/symbol-observable": "^2.0.3",
"**/rxjs/symbol-observable": "^2.0.3",
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>
4 years ago
"**/xmlhttprequest-ssl": "^1.6.2",
"3box/ipfs/ipld-zcash/zcash-bitcore-lib/lodash": "^4.17.21",
"3box/ipfs/ipld-zcash/zcash-bitcore-lib/elliptic": "^6.5.4",
"3box/ipfs/libp2p-mdns/multicast-dns/dns-packet": "^5.2.2",
"3box/**/libp2p-crypto/node-forge": "^0.10.0",
"3box/**/libp2p-keychain/node-forge": "^0.10.0",
"analytics-node/axios": "^0.21.1",
"ganache-core/lodash": "^4.17.21",
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>
4 years ago
"netmask": "^2.0.1",
"pull-ws": "^3.3.2",
"ws": "^7.4.6"
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
5 years ago
},
9 years ago
"dependencies": {
"3box": "^1.10.2",
"@babel/runtime": "^7.5.5",
"@download/blockies": "^1.0.3",
"@ethereumjs/common": "^2.3.1",
"@ethereumjs/tx": "^3.2.1",
"@formatjs/intl-relativetimeformat": "^5.2.6",
"@fortawesome/fontawesome-free": "^5.13.0",
"@lavamoat/preinstall-always-fail": "^1.0.0",
"@material-ui/core": "^4.11.0",
"@metamask/contract-metadata": "^1.27.0",
"@metamask/controllers": "^12.0.0",
"@metamask/eth-ledger-bridge-keyring": "^0.6.0",
"@metamask/eth-token-tracker": "^3.0.1",
"@metamask/etherscan-link": "^2.1.0",
"@metamask/jazzicon": "^2.0.0",
"@metamask/logo": "^2.5.0",
"@metamask/obs-store": "^5.0.0",
"@metamask/post-message-stream": "^4.0.0",
"@metamask/providers": "^8.1.1",
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.
5 years ago
"@popperjs/core": "^2.4.0",
"@reduxjs/toolkit": "^1.5.0",
"@sentry/browser": "^5.26.0",
"@sentry/integrations": "^5.26.0",
"@zxing/library": "^0.8.0",
"abortcontroller-polyfill": "^1.4.0",
"analytics-node": "^3.4.0-beta.3",
"await-semaphore": "^0.1.1",
"bignumber.js": "^4.1.0",
"bn.js": "^4.11.7",
"classnames": "^2.2.6",
"content-hash": "^2.5.2",
7 years ago
"copy-to-clipboard": "^3.0.8",
"currency-formatter": "^1.4.2",
"debounce-stream": "^2.0.0",
"deep-freeze-strict": "1.1.1",
"end-of-stream": "^1.4.4",
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>
4 years ago
"eth-block-tracker": "^5.0.1",
"eth-ens-namehash": "^2.0.8",
"eth-json-rpc-filters": "^4.2.1",
"eth-json-rpc-infura": "^5.1.0",
"eth-json-rpc-middleware": "^6.0.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>
4 years ago
"eth-keyring-controller": "^6.2.0",
"eth-method-registry": "^2.0.0",
"eth-phishing-detect": "^1.1.14",
"eth-query": "^2.1.2",
"eth-rpc-errors": "^4.0.2",
"eth-sig-util": "^3.0.0",
"eth-trezor-keyring": "^0.7.0",
"ethereum-ens-network-map": "^1.0.2",
"ethereumjs-abi": "^0.6.4",
"ethereumjs-util": "^7.0.10",
"ethereumjs-wallet": "^0.6.4",
"ethers": "^5.0.8",
"ethjs": "^0.4.0",
"ethjs-contract": "^0.2.3",
"ethjs-ens": "^2.0.0",
"ethjs-query": "^0.3.4",
"extension-port-stream": "^2.0.0",
"extensionizer": "^1.0.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>
4 years ago
"fast-json-patch": "^2.2.1",
"fast-safe-stringify": "^2.0.7",
"fuse.js": "^3.2.0",
"globalthis": "^1.0.1",
"human-standard-collectible-abi": "^1.0.2",
"human-standard-token-abi": "^2.0.0",
"immer": "^8.0.1",
"json-rpc-engine": "^6.1.0",
5 years ago
"json-rpc-middleware-stream": "^2.1.1",
"jsonschema": "^1.2.4",
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>
4 years ago
"labeled-stream-splicer": "^2.0.2",
"localforage": "^1.9.0",
"lodash": "^4.17.21",
"loglevel": "^1.4.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>
4 years ago
"luxon": "^1.26.0",
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
5 years ago
"nanoid": "^2.1.6",
"nonce-tracker": "^1.0.0",
"obj-multiplex": "^1.0.0",
"pify": "^5.0.0",
"promise-to-callback": "^1.0.0",
"prop-types": "^15.6.1",
"pubnub": "4.27.3",
7 years ago
"pump": "^3.0.0",
"punycode": "^2.1.1",
"qrcode-generator": "1.4.1",
"react": "^16.12.0",
"react-dnd": "^3.0.2",
"react-dnd-html5-backend": "^7.4.4",
"react-dom": "^16.12.0",
"react-idle-timer": "^4.2.5",
"react-inspector": "^2.3.0",
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.
5 years ago
"react-popper": "^2.2.3",
"react-redux": "^7.2.0",
"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",
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>
3 years ago
"requirejs": "^2.3.6",
"reselect": "^3.0.1",
"rpc-cap": "^3.2.1",
"safe-event-emitter": "^1.0.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>
4 years ago
"ses": "^0.12.4",
"single-call-balance-checker-abi": "^1.0.0",
"swappable-obj-proxy": "^1.1.0",
"textarea-caret": "^3.0.1",
"unicode-confusables": "^0.1.1",
"valid-url": "^1.0.9",
5 years ago
"web3": "^0.20.7",
"web3-stream-provider": "^4.0.0"
9 years ago
},
"devDependencies": {
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>
3 years ago
"@babel/code-frame": "^7.12.13",
"@babel/core": "^7.12.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>
4 years ago
"@babel/eslint-parser": "^7.13.14",
"@babel/eslint-plugin": "^7.12.1",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.4",
"@babel/plugin-proposal-object-rest-spread": "^7.5.5",
"@babel/plugin-proposal-optional-chaining": "^7.8.3",
"@babel/plugin-transform-runtime": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"@babel/preset-react": "^7.0.0",
"@babel/register": "^7.5.5",
"@lavamoat/allow-scripts": "^1.0.6",
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>
3 years ago
"@lavamoat/lavapack": "^1.0.4",
"@metamask/auto-changelog": "^2.1.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>
4 years ago
"@metamask/eslint-config": "^6.0.0",
"@metamask/eslint-config-jest": "^6.0.0",
"@metamask/eslint-config-mocha": "^6.0.0",
"@metamask/eslint-config-nodejs": "^6.0.0",
"@metamask/forwarder": "^1.1.0",
"@metamask/test-dapp": "^4.0.1",
"@sentry/cli": "^1.58.0",
"@storybook/addon-actions": "^6.1.17",
"@storybook/addon-backgrounds": "^6.1.17",
"@storybook/addon-knobs": "^6.1.17",
"@storybook/addon-toolbars": "^6.1.17",
"@storybook/core": "^6.1.17",
"@storybook/react": "^6.1.17",
"@storybook/storybook-deployer": "^2.8.7",
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>
4 years ago
"@testing-library/jest-dom": "^5.11.10",
"@testing-library/react": "^10.4.8",
"@testing-library/react-hooks": "^3.2.1",
"@types/react": "^16.9.53",
"addons-linter": "1.14.0",
"babelify": "^10.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>
3 years ago
"bify-module-groups": "^1.0.0",
"bify-vinyl-gator": "^1.0.0",
"brfs": "^2.0.2",
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>
3 years ago
"browser-pack": "^6.1.0",
"browserify": "^16.5.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>
5 years ago
"chalk": "^3.0.0",
"chromedriver": "^79.0.0",
"concurrently": "^5.2.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
4 years ago
"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>
4 years ago
"css-to-xpath": "^0.1.0",
"del": "^3.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>
3 years ago
"duplexify": "^4.1.1",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.15.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>
4 years ago
"eslint": "^7.23.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.3.4",
"eslint-plugin-mocha": "^8.1.0",
"eslint-plugin-node": "^11.1.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>
4 years ago
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-react": "^7.23.1",
"eslint-plugin-react-hooks": "^4.2.0",
"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>
5 years ago
"fast-glob": "^3.2.2",
"fs-extra": "^8.1.0",
"ganache-cli": "^6.12.1",
"ganache-core": "^2.13.1",
"geckodriver": "^1.21.0",
"get-port": "^5.1.0",
"gulp": "^4.0.2",
"gulp-autoprefixer": "^5.0.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>
4 years ago
"gulp-dart-sass": "^1.0.2",
"gulp-livereload": "4.0.0",
"gulp-rename": "^2.0.0",
"gulp-rtlcss": "^1.4.0",
"gulp-sourcemaps": "^2.6.0",
"gulp-stylelint": "^13.0.0",
5 years ago
"gulp-watch": "^5.0.1",
"gulp-zip": "^4.0.0",
"history": "^5.0.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>
4 years ago
"jest": "^26.6.3",
"jsdom": "^11.2.0",
"koa": "^2.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>
4 years ago
"lavamoat": "^5.3.1",
"lavamoat-viz": "^6.0.9",
"lockfile-lint": "^4.0.0",
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>
4 years ago
"loose-envify": "^1.4.0",
"mocha": "^7.2.0",
"nock": "^9.0.14",
"node-fetch": "^2.6.1",
"nyc": "^15.0.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>
4 years ago
"patch-package": "^6.4.7",
"polyfill-crypto.getrandomvalues": "^1.0.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>
4 years ago
"prettier": "^2.2.1",
"prettier-plugin-sort-json": "^0.0.1",
"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>
3 years ago
"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>
5 years ago
"randomcolor": "^0.5.4",
"rc": "^1.2.8",
"react-devtools": "^4.10.1",
"read-installed": "^4.0.3",
"redux-mock-store": "^1.5.4",
"remote-redux-devtools": "^0.5.16",
"resolve-url-loader": "^3.1.2",
"sass": "^1.32.4",
"sass-loader": "^10.1.1",
"selenium-webdriver": "4.0.0-alpha.7",
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>
4 years ago
"semver": "^7.3.5",
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`)
5 years ago
"serve-handler": "^6.1.2",
"sinon": "^9.0.0",
"source-map": "^0.7.2",
"source-map-explorer": "^2.4.2",
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>
3 years ago
"squirrelly": "^8.0.8",
"string.prototype.matchall": "^4.0.2",
"style-loader": "^0.21.0",
"stylelint": "^13.6.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>
3 years ago
"terser": "^5.7.0",
"through2": "^4.0.2",
"ttest": "^2.1.1",
"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>
3 years ago
"vinyl-sourcemaps-apply": "^0.2.1",
"watchify": "^3.11.1",
"webpack": "^4.41.6",
"yargs": "^17.0.1"
9 years ago
},
"engines": {
"node": "^14.15.1",
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.
5 years ago
"yarn": "^1.16.0"
},
"lavamoat": {
"allowScripts": {
"chromedriver": true,
"geckodriver": true,
"@sentry/cli": true,
"electron": true,
"core-js": false,
"core-js-pure": false,
"keccak": false,
"secp256k1": false,
"web3": false,
"sha3": false,
"bufferutil": false,
"utf-8-validate": false,
"leveldown": false,
"ursa-optional": false,
"gc-stats": false,
"github:assemblyscript/assemblyscript": false,
"tiny-secp256k1": false,
"@lavamoat/preinstall-always-fail": false,
"fsevents": false
}
9 years ago
}
}