* 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
* 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
* 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
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.
* 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
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`).
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.
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).
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
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.
* 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>
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>
* 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>
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>
* 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
* Created new screen/page "Token details"
* Change color in scss
* Modify elements to the latest requirements and added unit tests
* Review requested changes
* Condensing files into one component
* Added unit tests for token details page
* Added redirection when switching networks, added image for a token and update unit tests
* Requested review changes
* Modify index.scss regarding of the requested review
* Delete data-testid's from Typography and token-details-page.js
* Requested review changes
* Ensure sign message button is only enabled on scroll
* Add button for message scrolling to signature request screen
* lint fix
* Only show scroll button if message is scrollable
Co-authored-by: ryanml <ryanlanese@gmail.com>
* Fixing signature request formatting, requiring scroll before sign
* Ensure sign button not disable when no scroll is required
* Test fix attempt #1
* Clean up e2e tests
Co-authored-by: Dan Miller <danjm.com@gmail.com>
This PR adds `snaps` under Flask build flags to the extension. This branch is mostly equivalent to the current production version of Flask, excepting some bug fixes and tweaks.
Closes#11626