1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00
Commit Graph

13891 Commits

Author SHA1 Message Date
Frederik Bolding
29e083c4c4 Show snap version on install (#13931)
* Add version to Snap install page

* Fix text sizing inconsistency

* Use a localized string for shorthand versions
2022-03-22 19:55:50 -07:00
Mark Stacey
bd48a2acb8 Fix snap e2e tests (#13912)
The snap e2e tests introduced in #13671 were broken due to a conflict
with the changes in #13895. The latter PR changed the version name for
non-main builds so that it always includes the build type.

The Firefox webdriver has been updated to use the new `getVersion`
utility, ensuring that it always looks for the correct build filename.
2022-03-22 19:54:33 -07:00
Shane
059d5d0488 Fixed firefox Snaps + add initial end-to-end tests (#13671)
* Changed registryUrl for snaps only in firefox
Fixed getPlatform to only be imported into metamask-controller in flask
Removed snaps specific testrunner script and use run-all with a cli option

* Fixed flakey tests

* Removed unneeded await

* Added delay

* Fixed linting
2022-03-22 19:54:33 -07:00
Hennadii Ivtushok
0461bbcded Snap removal confirmation (#13619)
* Add Snap removal confirmation

* Add styling for Snap removal confirmation

* Update styling

* Update button margin

* Re-use styling code

* Address comments

* Update Popover props

* Lint

* Lint

Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
Co-authored-by: Erik Marks <rekmarks@protonmail.com>
2022-03-22 19:54:33 -07:00
Hassan Malik
e795c29b3f Update snap install warning per designs and fix for popover component (#13844)
* updated snap install warning per designs, hotfix for popover component to remove box styles from it's scss file and introduce them as default props

* small fix
2022-03-22 19:54:33 -07:00
Dan Finlay
99604e5642 Document Flask build flag (#13597)
* Document Flask build flag

Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
2022-03-22 19:54:33 -07:00
Hassan Malik
dcdfa29a8e Add custom CSS to Popover (#13740)
* add boxes to popover sections for custom css

* updated doc strings

* added default props

* render Boxes only if the props are not empty

* possible fix

* second fix

* removed prop check function, converted header, footer and div elements to Box components and updated storybook and readme.mdx

* remove non existing prop

* fixed export issue

* updated storybook
2022-03-22 19:54:33 -07:00
Hassan Malik
9bb668d958 minor fixes per snaps pr comments (#13721) 2022-03-22 19:54:33 -07:00
Mark Stacey
a87c84e952
Merge pull request #14085 from MetaMask/Version-v10.11.3
Version v10.11.3 RC
2022-03-22 16:36:30 -02:30
Mark Stacey
2779756708 Fix dependency audit failure
The Yarn resolution for `node-forge` has been updated to use a more
recent version of the library that includes fixes for the
vulnerabilities currently causing our audit job to fail. This update
should include no breaking changes.
2022-03-22 15:50:58 -02:30
PeterYinusa
24222fbed7 update chromedriver (#13854) 2022-03-22 08:57:48 -02:30
Mark Stacey
47c4409957 Update changelog 2022-03-21 23:08:05 -02:30
Mark Stacey
8b10b85891 Update lockfile
The lockfile became invalid due to dependencies introduced in cherry-
picked commits.
2022-03-21 23:07:20 -02:30
Mark Stacey
49e65a7061 Fix SrpInput small viewport styles (#14087)
The styles for smaller viewports were broken because I forgot to update
the small-screen grid template after adding the "paste-tip". The styles
have now been updated to fit the content properly on all of our
supported screen sizes.
2022-03-21 23:05:42 -02:30
Mark Stacey
00341cd3b3 Split SRP input by word (#14016)
* Initial implementation of new SrpInput component

This new version of the SrpInput component uses a separate field for
each word of the SRP. Only one field can be revealed at a time, making
it less likely that it gets accidentally revealed to somebody.

* Fix copy mistakes

* Move container div from 'create vault' to 'srp-input', and setup grid layout

* Increase size of title

* Remove hard-coded width in Storybook to allow testing different viewport sizes

* Improve layout

* Improve margins

* Update dropdown text

* Expand SRP input section

* Remove unused localized messages

* Update dropdown option names in unit tests

* Replace checkbox with show/hide toggle

* Remove unused localized message

* Fix 'data-testid' prop name

* Fix e2e test imports using paste

* Use 'ActionableMessage' component for error message

* Convert error popover to actionable message

* Add tip about pasting the SRP

* Remove invalid prop

The "info" style of `ActionableMessage` is the default, so no type is
required.

* Use more readable test convenience methods

The method `toBeInTheDocument()` is now used over `not.toBeNull()` to
improve the readability of tests. Likewise, the convenience method
`.clear` is now used to clear fields rather than manually entering the
key combination to clear a field.

* Fix misspelled word
2022-03-21 18:53:07 -02:30
Mark Stacey
4adadd3325 Add ShowHideToggle component (#13979)
Add a new component for controlling whether a field should be shown
or hidden. This will be used in later PRs as a control for sensitive
fields that are hidden by default.

This component should be fully accessible. Both mouse and keyboard
interactions have been tested, and `aria-label` attributes have been
added to explain the two "eye" icons that don't have any corresponding
text.

Thorough unit tests have been written, testing all props except
`className` (I don't know how to test that using Jest/`jsdom`).
2022-03-21 18:51:19 -02:30
Mark Stacey
35f51275ad Add pasteIntoField webdriver method (#14004)
A new method has been added to the e2e webdriver for pasting text into
a field. This will be required to properly test a change to the SRP
input, which will be coming in a separate PR.

A few existing e2e tests have been updated to use this method to input
the SRP, to show that it works properly.
2022-03-21 18:51:18 -02:30
Mark Stacey
c154145e85 Add IconEye and IconEyeSlash icon components (#13978)
Add two new FontAwesome icon components. The first is an eye, and the
second is an eye with a slash through it. These will be used in a
subsequent PR for a "Show/Hide" toggle.
2022-03-21 18:51:18 -02:30
Mark Stacey
851f9b30b4 Add data-test-id prop to TextField component (#13973)
The `data-test-id` prop has been added to `TextField`. This prop allows
selecting this component more easily from e2e and unit tests. This is
required for a subsequent PR that includes a text field that cannot be
selected for by placeholder or contents or label (any of which would
have been preferable).
2022-03-21 18:51:18 -02:30
Mark Stacey
1eecc59969 Improve unit tests for SrpInput component (#13803)
The library `@testing-library/user-event` has been updated to the
latest beta version, so that our unit tests better model real user
interactions. In particular, I found that previously the `paste` event
was missing the `clipboardData` API, so it was impossible to implement
any custom handling of paste events (which we will need in later PRs).

See the `v14.0.0-beta.1` release notes for a list of all breaking
changes [1]. The main change is that all methods now return Promises.
The `paste` method has also been dramatically simplified.

The unit tests have also been updated to reset all mocks before each
test. These tests don't have any shared mocks, but this is generally a
good practice, to ensure that tests don't develop accidental inter-
dependencies.

[1]: https://github.com/testing-library/user-event/releases/tag/v14.0.0-beta.1
2022-03-21 18:51:18 -02:30
Mark Stacey
22f9de9a2c Refactor: Extract SRP input from create vault component (#13720)
This is a pure refactor that extracts the SRP input from the
`CreateNewVault` component. This is intended to make future changes to
the SRP input easier, and to reduce duplication between the old and new
onboarding flows.

Extensive unit tests have been added for the new SRP input component.

A new test library was added (`@testing-library/user-event`) for
simulating user events with components rendered using the
`@testing-library` library.

A new helper method has been added (`renderWithLocalization`) for
rendering components using `@testing-library` with just our
localization contexts added as a wrapper. The localization contexts
were already added by the `renderWithProviders` helper function, but
there is no need for a Redux provider in these unit tests.
2022-03-21 18:51:18 -02:30
MetaMask Bot
716931a492 Version v10.11.3 2022-03-21 20:52:04 +00:00
Dan J Miller
f157cecf39
Merge pull request #13993 from MetaMask/Version-v10.11.2
Version v10.11.2 RC
2022-03-16 18:35:13 -02:30
Dan J Miller
5cc135e5d7 Bump controllers to 27 (#13985) 2022-03-16 13:17:12 -02:30
Erik Marks
a3355d9ca5 @metamask/controllers@26.0.0 (#13867)
* @metamask/controllers@26.0.0
2022-03-16 13:12:37 -02:30
Dan Miller
76c3e212bb Update changelog for v10.11.2 2022-03-16 13:09:10 -02:30
Olusegun Akintayo
13f385aa30 Fix for connected sites throwing error if name is null. (#13974)
* Fix for connected sites throwing error if name is null.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Reverted yarn.lock changes.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-03-16 10:55:29 -02:30
MetaMask Bot
696f22a5a0 Version v10.11.2 2022-03-16 13:07:54 +00:00
Dan J Miller
d0b7acac2e
Merge pull request #13873 from MetaMask/Version-v10.11.1
Version v10.11.1 RC
2022-03-11 14:58:49 -03:30
André Ogle
0361aa6a93 Use pre-wrap instead of pre for signature content (#13828) 2022-03-11 11:34:11 -03:30
Dan Miller
7931e607cb Update changelog for v10.11.1 2022-03-10 00:27:01 -03:30
Daniel
b879bf1359 Set up the right gasLimit for STX (#13891)
* Set up the right gasLimit for STX

* Trigger Build

Co-authored-by: Dan J Miller <danjm.com@gmail.com>
2022-03-09 23:50:02 -03:30
Olusegun Akintayo
e7bf63a6d6 Fixes an issue where metamask popup is not loading on eth_accounts (#13840)
(first time).

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-03-09 23:50:02 -03:30
Niranjana Binoy
8c9efb2a1f Increase the txHistoryLimit in the transaction controller to 60 (#13743) 2022-03-09 09:19:11 -03:30
Niranjana Binoy
3f0fa89d8d Deleting transactions from currentNetworkTxnList based on unique address along with nonce and chainId (#13669) 2022-03-09 09:19:11 -03:30
Mark Stacey
c3feabf4de Update SRP representation
An array of integers is now used to represent the SRP in three cases:

* In the import wallet flow, the UI uses it to pass the user-provided
  SRP to the background (which converts the array to a buffer).
* In the create wallet flow, the UI uses it to retrieve the generated
  SRP from the background.
* When persisting the wallet to state, the background uses it to
  serialize the SRP.

Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
2022-03-08 17:15:11 -03:30
Alex Miller
7ec8bd49c7 [GridPlus] Updates Lattice dependencies (#13834) 2022-03-08 15:54:29 -03:30
MetaMask Bot
3ac4e7d051 Version v10.11.1 2022-03-08 16:34:06 +00:00
ryanml
c86a642096
Merge pull request #13706 from MetaMask/Version-v10.11.0
Version v10.11.0 RC
2022-03-04 18:41:56 -07:00
Daniel
d17d7f2d18 Set up STX controller state (#13843)
* persist stx controller state

* Pass STX controller state as the 3rd param

* Trigger Build

Co-authored-by: Dan Miller <danjm.com@gmail.com>
2022-03-04 16:52:59 -03:30
Ariella Vu
34bf555e50 Fix v10.11: Unable to find value of key "eth_accounts" for locale "en" in Permissions Modal (#13833)
* ConnectedAccountsPermissions: convert to FC

* permissions: add usePermissionsDescriptions
- fix ConnectedAccountsPermissions eth_accounts i18n

* ConnectedAccountsPermissions: rm .component
from path

* ConnectedAccountsPermissions: fix toggleExpanded

ensure we change previous state value

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

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2022-03-04 13:40:58 -03:30
ryanml
98b3da31c7 Restoring create password form layout (#13824) 2022-03-03 11:52:17 -07:00
ryanml
532cf54307 Revert "Allow sending up to 15 decimals on the send screen (#12707)" (#13823)
This reverts commit 8597cd1401.
2022-03-02 17:30:40 -07:00
ryanml
47661fc58d Persisting token address via URL (Token Details page) (#13807) 2022-03-02 09:05:41 -07:00
Olusegun Akintayo
eb5dc7d8b0 Fixed these issues in v10.11.0 (#13806)
After landing on Swap, a disclaimer of Smart Transactions appear, and an error on devTools shows the following: “invalid prop ‘type’ of value ‘ul’” supplied to ‘Typography’
    After enabling Smart Transactions, an error on devTools shows the following: “invalid prop ‘smartTransactionsOptInSatus’ of type ‘boolean supplied to ‘SlippageButtons’

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-03-02 09:05:24 -07:00
ryanml
61a7c0d476 fixing changelog 2022-03-02 09:05:10 -07:00
ryanml
c2f517686c Merge remote-tracking branch 'origin/master' into Version-v10.11.0 2022-03-02 09:04:08 -07:00
ryanml
a78c7e48c6
Merge pull request #13804 from MetaMask/Version-v10.10.2
Version v10.10.2 RC
2022-03-01 15:04:49 -07:00
ryanml
fe7db49f2c Updating changelog 2022-03-01 14:11:34 -07:00
MetaMask Bot
99653ed0e9 Version v10.10.2 2022-03-01 21:07:33 +00:00