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

17554 Commits

Author SHA1 Message Date
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
David Walsh
145280374d
Fix #19393 - Add indicator for Refresh list on tokens screen (#19952) 2023-07-11 10:43:39 -05:00
Niranjana Binoy
129f6f3f64
Token allowance flow update (#19666) 2023-07-11 10:57:59 -04:00
David Walsh
f9b1514914
UX: Ensure NFT Options Menu is Same Size as Tokens (#19953) 2023-07-11 09:11:31 -05:00
Frederik Bolding
a041da7c74
[FLASK] snaps@0.36.1-flask.1 (#19939)
* snaps@0.36.0-flask.1

* Update LavaMoat policies

* snaps@0.36.1-flask.1
2023-07-11 13:50:50 +02:00
ryanml
8e55e9541c
Fixing scroll references for Advanced and Security settings (#19771) 2023-07-11 11:35:58 +05:30
Mark Stacey
13b1f8c758
Add --retry-until-failure flag to e2e test script (#19532)
The e2e test script now accepts a `--retry-until-failure` flag that can
be useful for locally reproducing intermittent failures.

Normally the `retries` option will only retry upon failure. But if
you want the test to fail to inspect the failure state, you want it to
keep running until the first failure then stop. This flag accomplishes
that, reversing the retry conditions.
2023-07-10 17:10:13 -02:30
Mark Stacey
e43552bd55
Eliminate redundant locator building (#19585)
Our e2e test driver was building the locator object multiple times over
in some cases. The `Locator` object is required by certain webdriver
methods, but our driver methods all accept a "raw locator".

This change avoids a few redundant calls, and makes it easier to
improve the error message for a timeout failure (which will be done in
a later PR). It also makes the code match the documentation/parameter
names.
2023-07-10 17:09:37 -02:30
Mark Stacey
e7144411c7
Fix test build network controller state (#19922)
The default network controller state is currently invalid on test
builds. The initial state is set to localhost (Ganache) on test builds,
but that network configuration is missing.

The initial state for test builds has been updated to include the
network configuration for localhost. Additionally, the initial state
was updated to only be applied if persisted state is missing. This is
to ensure the initial network configuration state doesn't override test
fixtures in e2e tests.
2023-07-10 16:56:29 -02:30
Dan J Miller
6db241ab49
Merge pull request #19943 from MetaMask/master-sync
Master sync following v10.33.1
2023-07-10 15:58:48 -02:30
Dan J Miller
ec55725bb2 Merge branch 'develop' into master-sync 2023-07-10 15:14:00 -02:30
Mark Stacey
431712aaf9
Use legacy gas API for BSC (#19763)
The legacy gas API is still useful for BSC, which is a network our APIs
support that is not EIP-1559 compatible. The legacy gas API will now be
used for BSC prior to using RPC methods as a fallback.

This brings extension closer in alignment with mobile, which also uses
the legacy gas API for BSC.

The E2E network mock function has been updated to use a variable for
the initial test network. This made it easier to write the e2e test for
the BSC case.
2023-07-10 14:09:39 -02:30
Monte Lai
f4305adb9e fix: fetch for snap registry (#19866) 2023-07-10 13:54:52 -02:30
Matthew Walsh
ec7c64d4fc Provide missing history property (#19896) 2023-07-10 13:54:52 -02:30
George Weiler
96f2ab4dae feat: adds linea mainnet buyable support in anticipation of July 11 launch (#19854)
* feat: adds linea mainnet support in anticipation of July 11 launch

* chore: fixes linting issue

* chore: adds comma for linting

---------

Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com>
Co-authored-by: Dan J Miller <danjm.com@gmail.com>
2023-07-10 13:54:34 -02:30
Mark Stacey
9c278c3610
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-10 12:56:34 -02:30
António Regadas
57519235bb
[MMI] Adds dev MMI configuration url (#19899)
* adds dev config url

* env var added to metamaskrc

* clean up

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-07-10 09:52:33 +01:00
Dan J Miller
e72f829cde
Merge pull request #19910 from MetaMask/Version-v10.33.1
Version v10.33.1 RC
2023-07-07 16:37:57 -02:30
Dan J Miller
5f6a61bec5 Update lavamoat for v10.33.1 2023-07-07 15:58:18 -02:30
Elliot Winkler
b385cbcbcc
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-07 12:14:18 -06:00
Matthew Walsh
779609de8d Patch signature controller to catch message promise (#19927) 2023-07-07 14:01:00 -02:30
Matthew Walsh
f31702653e Provide missing history property (#19896) 2023-07-07 14:01:00 -02:30
Dan J Miller
9187f32178 Version v10.33.1 2023-07-07 14:01:00 -02:30
Matthew Walsh
b70c4a8042
Patch signature controller to catch message promise (#19927) 2023-07-07 13:31:21 -02:30
David Walsh
4b38a2f054
UX: Multichain: Convert Networks Menu to Modal (#19803)
* UX: Multichain: Convert Networks Menu to Modal

* Fix padding

* Remove dead CSS

* moved show network to bottom

* updated snapshot

---------

Co-authored-by: NidhiKJha <menidhikjha@gmail.com>
Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-07-07 19:38:24 +05:30
David Walsh
64813fb660
UX: Multichain: Use Modal for AccountListMenu (#19809)
* UX: Multichain: Use Modal for AccountListMenu

* Update ui/components/multichain/account-list-menu/account-list-menu.js

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

---------

Co-authored-by: George Marshall <george.marshall@consensys.net>
Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-07-07 19:18:26 +05:30
Nidhi Kumari
a2730d46fb
updated background color (#19891) 2023-07-07 18:52:23 +05:30
Frederik Bolding
4918aa4c34
[FLASK] Fix Snaps UI divider (#19919) 2023-07-07 15:10:58 +02:00
Brad Decker
484dae32e8
test/e2e: add test for transaction finalized metric events (#19837)
* add transaction finalized metric events

* remove another time based property

* better error messaging

* try to guarantee order of events
2023-07-07 07:06:01 -05:00