1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00
Commit Graph

17482 Commits

Author SHA1 Message Date
Dan J Miller
839543c5db
Merge pull request #19848 from MetaMask/Version-v10.34.0
Version v10.34.0 RC
2023-07-14 15:06:12 -02:30
Nidhi Kumari
5bc0ba7f3a
Move "Import NFTs" to Modal (#19806)
* moved import nft to modal

* fixed modal state

* updated port-nft-popup

* updated onChange for import nft modal

* updated tests

* updated tests

* updated tests

* added story and updated spec file

* updated spec file

* updated spec file

* updated spec file for import-nft

* added focus to form field

* added autofocus to tokenId
2023-07-14 21:48:41 +05:30
Nidhi Kumari
7bdd76a4ad
updated hardware wallet text (#20026) 2023-07-14 21:12:01 +05:30
David Walsh
45b7b0ca76
UX: Network Menu: Disable testnet toggle when on testnet (#19951) 2023-07-14 08:21:53 -05:00
Albert Olivé
91c84996b7
[MMI] Added missing locales (#20024)
* added missing locales

* Added missing locale
2023-07-14 15:02:00 +02:00
Dan J Miller
c25d47952e Remove failing audit exclusion for GHSA-h755-8qp9-cq85 2023-07-14 09:35:58 -02:30
Elliot Winkler
65946c47c4 Restore support for Linea networks (#20011)
When the NetworkController in this repo was replaced with
`@metamask/network-controller`, support for Linea networks was lost
as it did not support it at that time. `@metamask/network-controller`
has since been updated, so this commit bumps that package to restore
support.
2023-07-14 09:35:58 -02:30
Mark Stacey
ccc4cf1bb9 Resolve two new security advisories (#19940)
Two new security advisories have been resolved. These advisories are
causing CI to fail on `develop`. Neither presents any risk to us,
as they are prototype pollution issues that are prevented by lockdown.

The first advisory isn't easy for us to patch. It's caused by an
outdated version of `protobufjs` used by `@trezor/transport`. It has
been ignored for now, until Trezor updates that package.

For the second advisory (related to `tough-cookie`), it was resolved
by updating that dependency in our lockfile.
2023-07-14 09:35:58 -02:30
Elliot Winkler
c9d2e61400 Bump @metamask/network-controller to 10.3.0 (#19903)
In the new version of NetworkController, it will now precreate network
clients for built-in and custom networks and expose those network
clients for consumers. This furthers the multichain UX project by making
it possible for MetaMask to interface with multiple networks
simultaneously.

This commit also upgrades `@metamask/gas-fee-controller` to prevent a
peer dependency warning from showing up as well as
`@metamask/controller-utils` in order to reduce the dependency tree.
There are no user-facing changes to either package.
2023-07-14 09:35:51 -02:30
David Walsh
6c04d76502 Fix #19941 - Correctly show network name and selection when chainIds collide (#19947) 2023-07-14 05:54:02 -02:30
Nidhi Kumari
710101991c fixed button in wallet-overview (#19920)
* fixed button in wallet-overview

* lint fix

* updated selector css with class
2023-07-14 05:54:02 -02:30
Elliot Winkler
751120bd01
Restore support for Linea networks (#20011)
When the NetworkController in this repo was replaced with
`@metamask/network-controller`, support for Linea networks was lost
as it did not support it at that time. `@metamask/network-controller`
has since been updated, so this commit bumps that package to restore
support.
2023-07-13 16:57:31 -06:00
Howard Braham
3ef2faf41c
fix(clipboard): Increase DEFAULT copy to clipboard time (#20008) 2023-07-13 13:49:13 -07:00
Ariella Vu
0917b7c52f
Add alternative summary UI with arrow icon to the Disclosure component (#19770)
* disclosure: add isArrowSummary option w/ UI

* disclosure.scss: add missing trailing semicolon

* Disclosure: replace isArrowSummary -> type prop

* Disclosure: alphabetize props

* Disclosure: add cursor: pointer

* storybook: add Disclosure - Type Arrow

* Disclosure: margin-left: 0 arrow type content

* Disclosure: fix margin-left: 0 arrow type

* Disclosure: support Text media query for Arrow

* Disclosure: clean rn type -> variant

* Disclosure: use size prop for arrow summary text

* Disclosure: update rest of type -> variant

* Disclosure: 1 more type -> variant

* Disclosure: TypeArrow -> VariantArrow
2023-07-13 22:38:42 +02:00
Garrett Bear
090476d9a2
ButtonIcon background & ButtonBase disabled update (#19976)
* button background hover updates

* add buttonlink underline

* update button base disabled

* fix size auto

* Update ui/components/component-library/button-link/button-link.stories.js

Co-authored-by: George Marshall <george.marshall@consensys.net>

* remove underline

---------

Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-07-13 13:22:40 -07:00
David Walsh
719d8a499b
Fix #19941 - Correctly show network name and selection when chainIds collide (#19947) 2023-07-13 13:29:53 -05:00
Nidhi Kumari
f17a841677
fixed button in wallet-overview (#19920)
* fixed button in wallet-overview

* lint fix

* updated selector css with class
2023-07-13 15:31:10 -02:30
David Walsh
0ba409662e
UX: Remove Portfolio from Token Overview Page (#19988)
Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-07-13 12:52:27 -05:00
Dan J Miller
3c981d78d5
Update changelog for v10.34.0 (#20002) 2023-07-13 15:15:53 -02:30
David Walsh
fac889c111 Fix #19548 - Increase address copy to clipboard time (#19948) 2023-07-13 15:11:27 -02:30
Mark Stacey
88c433cd09 Prevent controller events from crashing (#19963)
* Prevent controller events from crashing

The package `@metamask/base-controller` has been updated to v3.1, which
includes a change to how event subscriber errors are handled. Errors
thrown in event subscribers will no longer interrupt event publishing.

Subscriber errors are caught and thrown in a timeout handler, ensuring
that they are logged and captured by Sentry. We can find any subscriber
errors by looking at the background console, or at the Sentry
dashboard.

Fixes #19801

* Update LavaMoat policies

---------

Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
2023-07-13 15:09:41 -02:30
Dan J Miller
f145331665 Fix memory based performance problem caused by use of lodash memoize in box component (#19993) 2023-07-13 15:03:01 -02:30
Dan J Miller
5529c5963e Merge branch 'master' into Version-v10.34.0 2023-07-13 14:05:19 -02:30
Albert Olivé
47fe542273
[MMI] Review interactive replacement token flow (#19974)
* Sending showCustodyConfirmLink as a prop and fixing other issues

* Upgraded MMI extension monrepo and trying to fix the issue

* prevents deeplink from closing

* Fixed styles of Custody view and changed the place of it

* Fixed CI issues

* fixing eslint issues

* Update LavaMoat policies

* fixing tests

* Fixed test

* updated snapshots

* Improving IRT flow

* Fixing everything

* Finish fixing all issues

* Fixed institutional entity done page styles

* Fixing boxes

* Fixed issue with checkbox

* Fixed tests and styles

* Removed duplicated lodash

* updated snapshot

* Fixing tests

* Removed unused test

* Fixed snapshot

* Fixed snapshot

---------

Co-authored-by: Antonio Regadas <antonio.regadas@consensys.net>
Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
2023-07-13 18:27:49 +02:00
Dan J Miller
16481268cc
Fix memory based performance problem caused by use of lodash memoize in box component (#19993) 2023-07-13 12:23:10 -02:30
legobeat
0981509e82
devDeps: jsdom@11.12.0->16.7.0 (#19971)
* bump parse5; port patch

* devDeps: jsdom@11.5.1->16.7.0
  - patch-revert https://github.com/jsdom/jsdom/pull/2076
  - jsdom's storage-overriding does not play well with test suite usage of
localforage:
    $ yarn test:unit:global
    ✖ ERROR: TypeError: Cannot set property localStorage of #<Window> which has only a getter
        at Object.<anonymous> (/app/test/helpers/setup-helper.js:79:32)
        at Module._compile (node:internal/modules/cjs/loader:1198:14)
        at Module.m._compile (/app/node_modules/ts-node/src/index.ts:1459:23)
        at Module._compile (/app/node_modules/pirates/lib/index.js:136:24)
        at Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
        at newLoader (/app/node_modules/pirates/lib/index.js:141:7)
        at Object.require.extensions.<computed> [as .js] (/app/node_modules/ts-node/src/index.ts:1462:12)
        at Module.load (node:internal/modules/cjs/loader:1076:32)
        at Function.Module._load (node:internal/modules/cjs/loader:911:12)
        at Module.require (node:internal/modules/cjs/loader:1100:19)
        at require (node:internal/modules/cjs/helpers:108:18)
        at Object.<anonymous> (/app/test/setup.js:4:1)
        at Module._compile (node:internal/modules/cjs/loader:1198:14)
        at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
        at Module.load (node:internal/modules/cjs/loader:1076:32)
        at Function.Module._load (node:internal/modules/cjs/loader:911:12)
        at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)
        at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
        at async Promise.all (index 0)
        at ESMLoader.import (node:internal/modules/esm/loader:530:24)
        at importModuleDynamicallyWrapper (node:internal/vm/module:438:15)
        at formattedImport (/app/node_modules/mocha/lib/nodejs/esm-utils.js:7:14)
        at exports.requireOrImport (/app/node_modules/mocha/lib/nodejs/esm-utils.js:48:32)
        at exports.handleRequires (/app/node_modules/mocha/lib/cli/run-helpers.js:94:28)
        at /app/node_modules/mocha/lib/cli/run.js:353:25

* update lavamoat policies

* update lavamoat build policy
2023-07-13 23:06:08 +09:00
Danica Shen
2f03c0d62a
feat(19726): fix flaky test in Dapp interactions caused by home-container rerender (#19997) 2023-07-13 13:02:06 +01:00
Frederik Bolding
30a77d0483
[FLASK] Fix overflow on snaps connect screen (#19995) 2023-07-13 13:40:58 +02:00
Albert Olivé
b5ece42ca1
[MMI] Fix Connect MMI and Deep link Flows (#19881)
* Sending showCustodyConfirmLink as a prop and fixing other issues

* Upgraded MMI extension monrepo and trying to fix the issue

* prevents deeplink from closing

* Fixed styles of Custody view and changed the place of it

* Fixed CI issues

* fixing eslint issues

* Update LavaMoat policies

* fixing tests

* Fixed test

* updated snapshots

* reorder, otherwise it won't make sense

* adds necessary methods

* removes duplicated key value

* updated snapshot

---------

Co-authored-by: Antonio Regadas <antonio.regadas@consensys.net>
Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
Co-authored-by: António Regadas <apregadas@gmail.com>
2023-07-13 10:42:08 +02:00
Mark Stacey
4e89c6ca8c
Prevent controller events from crashing (#19963)
* Prevent controller events from crashing

The package `@metamask/base-controller` has been updated to v3.1, which
includes a change to how event subscriber errors are handled. Errors
thrown in event subscribers will no longer interrupt event publishing.

Subscriber errors are caught and thrown in a timeout handler, ensuring
that they are logged and captured by Sentry. We can find any subscriber
errors by looking at the background console, or at the Sentry
dashboard.

Fixes #19801

* Update LavaMoat policies

---------

Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
2023-07-12 20:05:57 -02:30
Mark Stacey
70dd9a0254
Prevent controller events from crashing (#19963)
* Prevent controller events from crashing

The package `@metamask/base-controller` has been updated to v3.1, which
includes a change to how event subscriber errors are handled. Errors
thrown in event subscribers will no longer interrupt event publishing.

Subscriber errors are caught and thrown in a timeout handler, ensuring
that they are logged and captured by Sentry. We can find any subscriber
errors by looking at the background console, or at the Sentry
dashboard.

Fixes #19801

* Update LavaMoat policies

---------

Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
2023-07-12 20:05:27 -02:30
Mark Stacey
7ef2730c9a
Fix preview builds on CI (#19970)
Preview builds were setup to install correctly on CircleCI prior to
the Yarn v3 upgrade, but that integration broke with that upgrade. The
Yarn and CircleCI configuration has been updated to fix this.

The `.yarnrc.yaml` file has been updated to configure the GitHub
registry but leave it disabled by default. It can be enabled
dynamically using an environment variable. This lets us switch between
registries without updating the file.

The new workflow is documented here: https://github.com/MetaMask/core/pull/1481
2023-07-12 19:50:31 -02:30
Mark Stacey
d1d39ee1cd
Fix unit test failures (#19983)
* Fix unit test failures

Fix unit test failures by updating Jest snapshots

* Update additional outdated snapshot
2023-07-12 14:40:01 -07:00
Vladimir Saric
36eaaa19ed
Added customize tx nonce on ERC20 approve screen when feature is enabled (#17945) 2023-07-12 14:32:46 -04:00
Pedro Figueiredo
42c3a3958b
fix flakiness in mv3 multiple restart test (#19708)
* fix flakiness in mv3 multiple restart test

* tweak msgs

* refactor

* refactor

* remove unused function
2023-07-12 19:27:44 +01:00
Jase Balderrama
c7782563c8
Fix misaligned icons in 'Connected sites' modal (#19944)
* Replace <SiteIcon> w/ <AvatarFavicon>

* Use constant values for borderColor & size

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>

---------

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-07-12 23:17:15 +05:30
Nidhi Kumari
beffc0611f
UX Multichain: Replace badge icon with current network image (#19964)
* updated network with current network

* Update snapshot

* fixed stories

---------

Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2023-07-12 22:57:39 +05:30
Dhruv
c86cbf5df2
Replacing deprecated constants (#19858) 2023-07-12 09:42:24 -07:00
jainex
23c3e8f32d
Replacing deprecated constants with enums (#19860) 2023-07-12 09:40:12 -07:00
David Walsh
e329818dab
Fix #19548 - Increase address copy to clipboard time (#19948) 2023-07-12 11:05:41 -05:00
Garrett Bear
c206200918
Update ButtonBase text variant and fix font smoothing (#19883)
* Update ButtonBase text variant

---------

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-07-12 07:37:33 -07:00
Jyoti Puri
73a203f106
Integrating ppom-validator with extension (#19511) 2023-07-12 19:50:55 +05:30
Mark Stacey
177ea83f20
Replace deprecated install command (#19968)
The `--frozen-lockfile` flag is not supported by Yarn v3. It has been
replaced by the Yarn v3 equivalent, which is `--immutable`.

Additionally, the `deps-install` script was deleted and this command
was inlined in the CircleCI configuration. I don't think we need to
maintain a separate script just for one command.
2023-07-12 10:17:14 -02:30
legobeat
614904d362
builds/mmi: Set default value for MMI_CONFIGURATION_SERVICE_URL to production endpoint (#19955)
* builds: set MMI_CONFIGURATION_SERVICE_URL default to prod endpoint (rf #19899)
* development/build: add MMI_CONFIGURATION_SERVICE_URL to required prod parameters
2023-07-12 21:01:49 +09:00
Nidhi Kumari
1ea934165b
Show product tour only on home page (#19938)
* show product tour only on home page

* updated variable name

---------

Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2023-07-12 17:03:58 +05:30
Vinicius Stevam
5736e670f7
Approval flow adding success and error pages (#19778) 2023-07-12 09:29:54 +01:00
Mark Stacey
2fad10e0a3
Fix MMI policy generation (#19967)
The command `yarn lavamoat:auto` will fail unless the environment
variable `CONFIGURATION_SERVICE_URL` is set locally. Most contributors
will have no reason to set this to anything.

This has been fixed by assigning this variable a default value of an
empty string, as the error suggests doing.
2023-07-11 18:43:22 -02:30
Mark Stacey
cc9d87c365
Fix intermittent build error (#19966)
Occasionally our builds have been failing with the error "Unexpected
end of JSON input", with a stack pointing at `lavamoat-core`. The file
in question was reading the policy, reading overrides, merging them,
then writing the policy back to disk.

The intermittent errors can be explained if the policy file was read in
one process while it was being written in another. The extension build
script builds bundles in multiple processes in parallel, so it does
follow that this would happen some of the time. This could result in a
partial policy file being read by the build script, resulting in a JSON
parsing error.

This has been fixed by removing the policy write step using a patch.
We don't need this step. We update the policy using a different
function altogether, and we have a CI job to ensure we never forget to
update it.
2023-07-11 18:27:52 -02:30
Danica Shen
3871b8abed
feat(19464): fix flaky test in MV3 Deploy contract and call contract methods (#19962)
* feat(19464): fix flaky test in Deploy contract and call contract methods

* remove commented out code
2023-07-11 20:17:27 +01:00
David Walsh
a8ad19da32
UX: Use System Theme for tooltip (#19954) 2023-07-11 13:23:07 -05:00