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

5444 Commits

Author SHA1 Message Date
Danica Shen
38876dc450
fix(20316): enrich error message for fetch-with-cache (#20742) 2023-09-06 15:02:22 +01:00
David Drazic
335d9598a9
Update Snap privacy warning content (#20741)
* Update Snap privacy warning content

* Update unit test

* Remove translations
2023-09-05 19:45:09 +02:00
Danica Shen
8608655886
fix(20548): fix warning levels in migration file (#20737) 2023-09-05 16:57:19 +01:00
MetaMask Bot
519444163c
feat(locale): New Crowdin translations by Github Action (#20563)
* New Crowdin translations by Github Action

* fix(locale): trigger a success pipeline with CLA verified

---------

Co-authored-by: metamaskbot <metamaskbot@users.noreply.github.com>
Co-authored-by: Danica Shen <zhaodanica@gmail.com>
2023-09-05 14:49:07 +01:00
Jyoti Puri
7906f18104
Blockaid validation should be done on ethereum mainnet only (#20709) 2023-09-05 15:43:43 +05:30
Jyoti Puri
997d1359d2
Reverting ppom.js file to old version (#20566) 2023-09-05 05:44:15 +05:30
Matthew Walsh
07adba5926
Use transactions array in frontend (#20523)
Send the entire transactions array to the frontend rather than currentNetworkTxList and unapprovedTxs.
2023-09-04 16:48:25 +01:00
Frederik Bolding
6ee90ac8b2
Add what's new popup for snaps (#20686)
* Add what's new popup for snaps

* Update SVG

* Update copy and link out

* Update SVG and fix lint

* Fix unnecessary space in copy

---------

Co-authored-by: Howard Braham <howrad@gmail.com>
2023-09-04 16:41:06 +02:00
Mark Stacey
20f654a348
Reduce logging in production builds (#20694)
Our logger middleware can be quite noisy in production, logging all RPC
requests. It has been updated to have more condensed logs in production
builds, but preserving the existing logging for development builds.
2023-09-04 10:35:23 -02:30
Ariella Vu
3d2de0211d
feat: Update Blockaid copies on What's new modal, Settings, and BannerAlert (#20671)
* feat: update Blockaid What's New copy

* feat: update Blockaid settings description copy

* feat: remove Blockaid more providers copy

* feat: update experimental settings padding

* feat: update Blockaid copy transactions -> transaction

* feat: rm Blockaid select provider copies

* feat: use blockaid BannerAlert "Powered By" copy

* style: add Blockaid toggle padding

* fix: rm unused notifications23DescriptionThree
also remove translactions for notifications23DescriptionOne except en
since it has been updated

* fix: What's New popup notif 23 test
following removal of notifications23DescriptionThree
2023-09-01 10:46:20 -07:00
Monte Lai
907cd8b7d1
add whatsnew popup to drop ledger support for firefox (#19498)
* add whatsnew popup to drop ledger support for firefox

* add missing 21 ui notification

* improved look of notification

* added NOTIFICATION_DROP_LEDGER_FIREFOX to prep for merge with develop

---------

Co-authored-by: Howard Braham <howrad@gmail.com>
2023-09-01 12:38:04 -04:00
Frederik Bolding
acf386c609
Fix missing property on snap export metric (#20685) 2023-09-01 13:10:42 +02:00
cryptodev-2s
83b1f1714d
Subscribe to event fired by KeyringController on account removal (#20478) 2023-08-31 18:35:34 +01:00
Albert Olivé
3376ea4e95
[MMI] Adding missing logic to handle custodian approval in token allowance (#20662) 2023-08-31 17:45:07 +02:00
Danica Shen
90a89f3f5b
fix(20314): fix window.left negative value causing polifll warning (#20653)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-08-31 15:15:09 +01:00
Ariella Vu
c15226325e
style: update Desktop App settings styles (#20676) 2023-08-31 06:50:21 -07:00
Brad Decker
92ad4bc35f
use @blockaid/ppom_release vs @blockaid/ppom (#20669)
* use @blockaid/ppom_release vs @blockaid/ppom

* build system file
2023-08-31 06:20:01 +09:00
cryptodev-2s
656b7878c2
Use getEncryptionPublicKey from Core KeyringController (#20646) 2023-08-30 18:10:37 +01:00
Michele Esposito
e2be27ed01
Use verifySeedPhrase from KeyringController (#19817)
refactor: use verifySeedPhrase from core KeyringController

---------

Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
Co-authored-by: cryptodev-2s <109512101+cryptodev-2s@users.noreply.github.com>
2023-08-30 14:59:22 +01:00
Pedro Figueiredo
827c2fb741
feat: Add more state props from controllers to Sentry mask (#20595)
* feat: update sentry mask adding  controller props to improve error monitoring

* fix:remove changes in chrome-driver dependency

* Remove properties from mask

* Add more values to mask

* Sort the mask alphabetically

* Add termsOfUseLastAgreed to mask

* Fix test imports

* Update policy gap test to compare UI mask

* Reorganize tests under one describe block

* Update snapshots

* Mask another timestamp in state snapshots

* Mask browser environment properties

* Add missing UI field mask, and refactor field masking/removal

* Eliminate remaining policy gaps

* Simplify ganache options

* Eliminate extra mask properties

* Update mask to capture dynamic keys

The mask now supports dynamic keys. This lets set more fine-grained rules
for which data to include within dynamic data structures.

The mask has been updated to include just top-level keys for various
token-related data collections in state. This lets us see the chain IDs
that users have tokens on. This will be useful in debugging Sentry
reports of invalid keys in these data structures.

* Add additional 'expected missing state' entries

* Remove unnecessary properties from state snapshot

* Add providerConfig.chainId to state snapshot

* Update error state snapshots

---------

Co-authored-by: Danica Shen <zhaodanica@gmail.com>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2023-08-29 20:47:58 -02:30
Brad Decker
863362dc37
Add whats new popup for changes to advanced gas fee (#20632)
* Add whats new popup for changes to advanced gas fee

* Update shared/notifications/index.js

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

* updated text

* verified working, changed order of init

* use first renderer for formatting issue

---------

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-08-29 16:15:35 -05:00
Nidhi Kumari
6a17d76efc
UX Multichain: Added Select an action Modal (#20559)
* added select-action-modal skeleton

* added select action modal item

* replaced stake link with constant

* added route for open and close of modal

* updated lint errors

* lint fix

* updated tests

* revert unnecessary changes

* fixed lint errors

* added suggestions

* lint fix

* updated test

* nit fix

* updated select action item to use button

* removed unused fragments

* moved onClose command to bottom

* moved select action modal on footer click

* changed isDisabled to disabled

* added hover and updated test

* nit fix
2023-08-29 22:15:30 +05:30
Daniel
bf1c087275
Capture exceptions (#20562) 2023-08-29 15:15:33 +02:00
Daniel
4e14e179c8
Update UI for blocked tokens, use the latest dev gas api URL (#20625) 2023-08-29 14:38:46 +02:00
Pedro Figueiredo
4c88961a39
fix: Remove obsolete network controller state properties (#20586)
* fix: remove obsolete network controller state properties

* address comments

* address comments

* address comments

* Add additional precautions for data mutation in migration tests

---------

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2023-08-28 14:25:56 -02:30
Frederik Bolding
4374e536a1
Track snap uninstalls (#20624)
* Track snap uninstalls

* Change order of execution
2023-08-28 15:27:52 +02:00
Brad Decker
64aef2a1c9
split advancedGasFee by network and erase previous options (#20576)
* Split out advanced gas fees by network and delete old values

* use arrow functions in preferences test

* changes

* added back priorityFeeProperCase to en messages

* update types

* remove case change
2023-08-26 17:58:26 -07:00
Danica Shen
71357b225a
fix:remove extra $ after variale in french locale (#20606) 2023-08-25 11:41:19 -05:00
Victor Thomas
cf651c4d63
Multichain v1 App Footer component (#20550)
* wip bottom navbar

* creating app-footer component

* moving appfooter inline styles to scss

* lint:fix

* refactor app-footer

* reverting home component, icon-button changes

* adding hrefs and tabindex
2023-08-25 12:28:15 -04:00
Jyoti Puri
77c7f34062
Updating watch NFT page header (#20569) 2023-08-25 18:27:17 +05:30
Maarten Zuidhoorn
f8a7a83e05
Update snaps-related copy (#20601)
* Update snaps-related copy

* Update test
2023-08-25 12:40:13 +02:00
Albert Olivé
6576a28edf
Added missing bindings (#20602) 2023-08-25 12:38:50 +02:00
Daniel
679d6686e3
Show a slippage notification again before submitting a swap, improve content for slippage notifications (#20364) 2023-08-25 11:44:31 +02:00
Howard Braham
d76b458235
fix(privateKey): Restore hold-to-reveal button for private key export (#20109)
* fix(privateKey): Restore hold-to-reveal button for private key export

* lint and unit test fixes

* adding e2e tests to reveal private key

* fixing lint issues

* fixed: Private key is able to be presented without tapping and holding the "Hold to reveal" CTA

* Incorrect password test and support hold to reveal

* improving unit tests

---------

Co-authored-by: Plasma Corral <32695229+plasmacorral@users.noreply.github.com>
Co-authored-by: Gustavo Antunes <17601467+gantunesr@users.noreply.github.com>
2023-08-24 17:35:26 -04:00
Danica Shen
00d155ce2f
feat(878): implement network txn toggle and new style (#20363)
* feat(878): implement new incoming transaction toggle networks for setting and onboarding

* Update state snapshots

* feat(878): change gaps, migration types based on comment

---------

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2023-08-24 11:27:42 +01:00
Frederik Bolding
f36261a9a6
Update snaps URLs (#20582) 2023-08-24 10:41:58 +02:00
Erik Marks
4a9316317f
Remove web3 shim usage event (#20376)
Removes the `Website Accessed window.web3 Shim` event from the `metamask_logWeb3ShimUsage` RPC method implementation. The method itself displays an alert to the user if a website attempts to access the `window.web3` shim, which we replaced the original, functional `window.web3` object with after said object was removed. This seems potentially useful, because we still get 5-star reviews on [the legacy web3 extension](https://addons.mozilla.org/en-US/firefox/addon/metamask-legacy-web3/).

The associated metrics event, on the other hand, is useless. It is rife with false positives, and doesn't tell us anything that we can't learn from download data for the legacy web3 extension. It's time to get rid of it.
2023-08-23 22:42:00 -07:00
David Walsh
79d9c18cb1
UX: Multichain: Add address to account picker, change connection to copy button (#20520)
* UX: Multichain: Add address to account picker, change connection to copy button

* Fix for very long account names
2023-08-23 11:36:03 -05:00
Daniel Rocha
0489911cc8
Remove call to _updateMemStoreKeyrings (#20369)
* Call the right `updateMemStoreKeyrings` method from `KeyringController`

* fix: don't call redundant methods

Co-authored-by: Michele Esposito <34438276+mikesposito@users.noreply.github.com>

---------

Co-authored-by: Michele Esposito <34438276+mikesposito@users.noreply.github.com>
2023-08-23 11:40:02 -04:00
Howard Braham
d3d30fd373
fix(settings): fixed two IPFS gateway issues (#19700)
* fix(settings): fixed two IPFS gateway issues

- adds back in two bugfixes that were originally in #19283
  - fixes #16871
  - fixes #18140

- achieves 100% code coverage for /ui/pages/settings/security-tab
- removes the npm package `valid-url`, which has not been updated in 10 years

* changes after #20172 was merged

* improved URL validation (specifically spaces)

* better Jest coverage

* response to legobeat review

* fixing lint and Jest
2023-08-22 22:13:13 -07:00
Dan J Miller
b8525566f2
Enable legacy HD paths for trezor users (#19552)
* Update eth-trezor-keyring to v1.1.0

* Revert "Revert "feature: Add legacy derivation path to Trezor (#19443)" (#19451)"

This reverts commit b5ef94b9f0.

* Fix trezor import

* Update lavamoat policies

* Remove accidentally committed code

* Fix type in previous commit
2023-08-22 16:11:52 -04:00
Albert Olivé
787fc13f19
Fixed bug that was causing to not show the correct account name and instead was displaying the default "Account x" one (#20555) 2023-08-22 17:50:33 +02:00
Pedro Figueiredo
e6cd452506
fix: Remove sentry warning on undefined TokenListController (#20547)
* fix sentry warning

* correct test

* switch to using spyOn method
2023-08-22 15:06:18 +01:00
MetaMask Bot
e543fca211
New Crowdin translations by Github Action (#18017)
Co-authored-by: metamaskbot <metamaskbot@users.noreply.github.com>
2023-08-22 14:34:31 +01:00
Matthew Walsh
37209a7d2e
Replace IncomingTransactionsController with helper (#20378)
Remove the IncomingTransactionController and replace it with an internal helper class.
Move incoming transactions into the central transactions object.
Create a new RemoteTransactionSource interface to decouple incoming transaction support from Etherscan.
Split the incoming transaction logic into multiple files for easier maintenance.
2023-08-22 10:17:07 +01:00
Michele Esposito
efd34343c8
Use KeyringController messenger events (#20341)
* refactor: use keyring-controller events and unlock methods

* test: add tests for setLocked

* rollback: call trezor dispose directly

* Update app/scripts/metamask-controller.js

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

---------

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2023-08-18 19:37:38 -02:30
Mark Stacey
885a8ce256
Fix Sentry breadcrumb collection during initialization (again) (#20532)
Sentry breadcrumb collection during initialization was broken in #20529
because we failed to consider that the `getSentryState` check was also
used for an opt-in check in the `beforeBreadcrumb` hook.

I had assumed that `getSentryState` was only used to get state to add
additional context to an error report. But the function has a second
purpose: to get state for the purposes of checking whether the user has
opted into MetaMetrics. In this second case, `mostRecentRetrievedState`
is sometimes unset (which violates an assumption made in #20529)

The `getMostRecentPersistedState` hook removed in #20529 has been
restored, ensuring that the `getSentryState` function returns Sentry
state after loading state for the first time, but before the first
error has occurred.

This mistake didn't cause e2e tests to fail because multiple errors are
currently thrown in the background upon initialization on `develop`
(relating to Snow scuttling). These errors were early enough that they
happened before the console logs that our breadcrumb test was testing
for. When #20529 was ported onto the v10.34.5 RC, these errors were not
present so the test failed correctly.
2023-08-18 18:26:27 -02:30
Mark Stacey
9cfa9ba6b0
Fix pre-initialization UI error state capture (#20529)
In the case where an error is thrown in the UI before initialization
has finished, we aren't capturing the application state correctly for
Sentry errors. We had a test case for this, but the test case was
broken due to a mistake in how the `network-store` was setup (it was
not matching the behavior of the real `local-tstore` module).

The pre-initialization state capture logic was updated to rely solely
upon the `localStore` instance used by Sentry to determine whether the
user had opted-in to metrics or not. This simplifies the logic a great
deal, removing the need for the `getMostRecentPersistedState` state
hook. It also ensures that state is captured corretly pre-
initialization in both the background and UI.
2023-08-18 16:32:28 -02:30
Dan J Miller
ca1ddeb59b
Fix and test log.info calls run for each migration (#20517)
* Fix and test log.info calls run for each migration

In migrator/index.js, log.info is called before an after each migration.
These calls are intended to produce breadcrumbs to be captured by sentry
in cases where errors happen during or shortly after migrations are run.
These calls were not causing any output to the console because the log.setLevel
calls in ui/index.js were setting a 'warn value in local storage that was being
used by logLevel in the background.

This commit fixes the problem by setting the `persist` param of setLevel to
false, so that the background no longer reads the ui's log level.

Tests are added to verify that these logs are captured in sentry breadcrumbs
when there is a migration error due to an invariant state.

* Improve breadcrumb message matching

The test modified in this commit asserts eqaulity of  messages from breadcrumbs
and hard coded expected results. This could cause failures, as sometimes the
messages contain whitespace characters. This commit ensures the assertions only
check that the expected string is within the message string, ignoring extra
characters.
2023-08-18 11:15:45 -02:30
Albert Olivé
60f149178c
[MMI] Set approved status in tx controller in MMI logic (#20507)
* fix(custodial-signing): set approved status in tx controller in MMI logic

* Fixed the issue that was not showing custody-confirm-link

---------

Co-authored-by: Shane Terence Odlum <shane.odlum@consensys.net>
2023-08-18 14:38:51 +02:00