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

13879 Commits

Author SHA1 Message Date
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
Dan J Miller
a5fe919f68 Add EIP-712 support for Trezor (#13693)
* Add EIP-712 support for Trezor

Co-authored-by: alisinabh <alisina.bm@gmail.com>
Co-authored-by: matejcik <ja@matejcik.cz>
Co-authored-by: Brandon Noad <Brandon.Noad@gmail.com>

* Update eth-trezor-keyring version

Co-authored-by: Alois Klink <alois.klink@gmail.com>
Co-authored-by: alisinabh <alisina.bm@gmail.com>
Co-authored-by: matejcik <ja@matejcik.cz>
Co-authored-by: Brandon Noad <Brandon.Noad@gmail.com>
2022-03-01 14:02:13 -07:00
ryanml
7af8570a4e Running yarn lavamoat:auto 2022-02-25 21:23:53 -07:00
ryanml
2177ba8951 Fixing changelog 2022-02-24 22:13:30 -07:00
ryanml
18ac23b516 Merge remote-tracking branch 'origin/master' into Version-v10.11.0 2022-02-24 22:11:56 -07:00
ryanml
2369782196
Merge pull request #13731 from MetaMask/Version-v10.10.1
Version v10.10.1 RC
2022-02-24 16:42:58 -07:00
ryanml
bbe441f98a Updating changelog 2022-02-24 13:32:51 -07:00
Daniel
e937d9c8e3 Small fixes for Swaps (#13732)
* Fix: Insufficient number of substitutions for key "stxSuccessDescription"

* Only calculate "approvalGas" if the "approvalNeeded" param is truthy in a quote

* "Swap from" has to be set to enable "Review Swap", set a default token for "Swap from"

* Fix: Unable to find value of key "undefined" for locale

* Use array destructuring
2022-02-24 13:32:39 -07:00
Dan Miller
676507a518 Run yarn lavamoat:auto 2022-02-23 21:58:20 -03:30
ryanml
a87068860f Updating changelog 2022-02-23 21:58:20 -03:30
Alex Miller
9d92b20222 [GridPlus] Updates SDK to v0.9.10 (hotfix) (#13691)
See: https://github.com/GridPlus/gridplus-sdk/releases/tag/v0.9.10-hotfix
2022-02-23 21:58:17 -03:30
Alex Miller
6dcaa0dd97 [GridPlus] Updates corresponding to Lattice firmware v0.13.2 (#13455)
This updates `eth-lattice-keyring`, which itself updates `gridplus-sdk`.
These changes are backwards compatible but do unlock functionality in
Lattice firmware v0.13.2

Underlying Changes:
* `gridplus-sdk`: https://github.com/GridPlus/gridplus-sdk/compare/v0.9.2...v0.9.7
* `eth-lattice-keyring`: https://github.com/GridPlus/eth-lattice-keyring/compare/v0.4.0...v0.4.9
2022-02-23 21:57:12 -03:30
MetaMask Bot
e6ea66ad4d Version v10.10.1 2022-02-23 21:56:23 -03:30