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

14030 Commits

Author SHA1 Message Date
Erik Marks
8c1779a51c Add missing Flask changelog entry 2022-03-25 16:19:58 -07:00
Dan J Miller
21b3f089e7
Update changelog v10.12.0 (#13994)
* Update Changelog for Verions-v10.12.0

* Fixing changelog format

Co-authored-by: ryanml <ryanlanese@gmail.com>
2022-03-25 17:16:03 -02:30
Daniel
115971d79c Improvements for Smart Transactions / Swaps (#14022)
- Don’t call /estimateGas if a user doesn’t have enough funds
- Hardcode block explorer URLs for Swaps
- Track the "stx_prev_user_opt_in" param
- Add fee estimates tracking for regular txs and STX
- Track estimated_gas and estimated_vs_used_gasRatio for STX
- Only track the "Error Smart Transactions" event once
- Don't overwrite "maxGasLimit" for STX on the View Quote page for better "balance needed" estimations
- Update description for Transak
- Fix styles for the input field on the Build Quote page
- Refactor variables for STX error types and add translation for each STX error type
- Do additional logging for the "current_stx_enabled" param
- Add a close icon for an STX notification, update STX content
2022-03-25 17:13:43 -02:30
Dan J Miller
5fec2b53a7 Transaction updates methods return whole tx meta (#14147)
* Transaction updates methods return whole tx meta

* Fix unit test

Co-authored-by: Dan Miller <danjm@pop-os.localdomain>
2022-03-25 17:13:43 -02:30
Olusegun Akintayo
67ef1ce51e On send/edit page, disable app header so that networks can't be changed (#14115)
* On send/edit page, disable app header so that networks can't be changed
in the middle of a transaction.

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

* Only disable header if we're in edit mode

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-03-25 17:13:42 -02:30
Niranjana Binoy
e9cd1237ce ImportToken does not clear up the page when going back (#14093) 2022-03-25 17:13:42 -02:30
Ariella Vu
73b3881348 Fix Settings Header Back Button and update "Add Contacts" position (#14103)
* Settings: use IconCaretLeft
- fix missing icon and fix icon position

* IconCaretLeft: fix onClick handler

* Settings: fix Add Contacts btn position

* Settings: update back btn paddings
- shrink padding a little because IconCaretLeft adds more width
2022-03-25 17:13:42 -02:30
Dan J Miller
07bcf1ca0a Ensure state updates after accepting or rejecting a watched asset, to prevent navigation errors. (#14043) 2022-03-25 17:13:42 -02:30
ryanml
b0a9b83f6f Removing iconClassName prop from NetworkDisplay (#14035) 2022-03-25 17:13:42 -02:30
seaona
a3d232ed3e Fix flaky test: add account (#14045) 2022-03-25 14:57:05 -02:30
Dan Miller
d5c693d9db Merge remote-tracking branch 'origin/master' into Version-v10.12.0-alt 2022-03-25 14:56:57 -02:30
Dan J Miller
48fa62f42a
Merge pull request #14143 from MetaMask/Version-v10.11.4
Version v10.11.4 RC
2022-03-24 13:27:48 -02:30
MetaMask Bot
b6d123bd24 Version v10.12.0 2022-03-24 08:21:08 -02:30
Erik Marks
2201c87c98
Update changelog (#14144) 2022-03-23 19:39:56 -07:00
Erik Marks
3363cdcce1 Fix lavamoat policy 2022-03-22 21:27:48 -07:00
Mark Stacey
4139aa26a9 Derive version suffix from build type and version (#13895)
The version of a build is now derived from both the `version` field in
`package.json` and the requested build type and version. The build type
and version are added onto the manifest version as a suffix, according
to the SemVer prerelease format.

We already have support in the extension for versions of this format,
but to apply a Flask or Beta version required manual updates to
`package.json`. Now it can be done just with build arguments.

A `get-version` module was created to make it easier to generate the
version in the various places we do that during the build. It was
created in the `development/lib` directory because it will be used by
other non-build development scripts in a future PR.

The `BuildType` constant was extracted to its own module as well, and
moved to the `development/lib` directory. This was to make it clear
that it's used by various different development scripts, not just the
build.
2022-03-22 20:41:01 -07:00
Erik Marks
8ea8b50683 Version v10.11.4 2022-03-22 20:17:18 -07:00
Frederik Bolding
5107f06afa snaps-skunkworks@0.10.6 (#14070)
* snaps-skunkworks@0.10.6

* iframe-execution-environment@0.4.2

Co-authored-by: Erik Marks <rekmarks@protonmail.com>
2022-03-22 19:55:51 -07:00
Frederik Bolding
cb89800a0a snaps-skunkworks@0.10.3 (#14041) 2022-03-22 19:55:51 -07:00
Frederik Bolding
d6434b4ace Fix permission list shrinking with less text (#13996)
* Fix permission list shrinking with text

* Fix linting issue
2022-03-22 19:55:51 -07:00
Erik Marks
6ccf52b5ae Fix yarn.lock (#13941) 2022-03-22 19:55:51 -07:00
Erik Marks
680d30f095 snaps-skunkworks@0.10.2 (#13901) 2022-03-22 19:55:51 -07:00
Mark Stacey
ce9dc12f75 Automate the Flask release process (#13898)
* Automate the Flask release

A Flask release will now be published alongside each main extension
release. The version of each Flask release will be the same as the
extension version except it will have the suffix `-flask.0`.

* Programmatically remove build prefix

The create GH release Bash script derives the Flask version from the
Flask build filename by removing the build prefix, leaving just the
version. Rather than hard-coding the prefix size to remove, it is now
calculated programmatically so that it is easier to read and update.

* Fix tag publishing

The tab publishing step used the wrong credentials, and didn't properly
identify the commit author. This has now been fixed.
2022-03-22 19:55:51 -07:00
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