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

5210 Commits

Author SHA1 Message Date
George Marshall
88154a4161
Typography design token color and docs update (#13758)
* Updating typography docs and removing some unused design-system constants

* Adding boxProps controls to default story
2022-03-08 10:29:32 -08:00
filipsekulic
ac9f263e1a
Write down your SRP page fixes (#13729)
* Fixed few things in 'Write down srp page' flow

* Applied requested changes

* Modified messages

Co-authored-by: Alex Donesky <adonesky@gmail.com>
2022-03-08 09:38:07 -06:00
David Walsh
4a6585fc4a
Fix wrong isEqualCaseInsensitive path (#13860) 2022-03-07 16:32:05 -08:00
Olusegun Akintayo
442edc5a91
Update EIP1559 params. (#13652)
* Draft methods to brak updateTransaction into smaller more targeted
methods.

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

* normalize and validate tx params.

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

* Method to normalize tx and check if it's unapproved.

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

* Move the methods to controllers/transactions/index.js

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

* Flesh out the methods to update transaction with custom notes.

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

* Test update gas fees

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

* Update swap approval transaction

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

* use lodash to remove undefined properties
update swap transaction tests

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

* Updates transaction user settings.

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

* Lint fixes.

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

* Add Update Transaction Metrics

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

* Update transaction gas fees actions.js

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

* Lint fixes.

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

* Update EIP 1559 Params.

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

* Lint Fixes.

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

* Documentations.

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

* Remove metrics from this PR

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

* Lint fixes: Removed unused variables

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

* Add more params to updateTransactionGasFees.

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

* Update eip1559 method to editableParams.

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

* lint fixes.

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

* Fix Mocha tests

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

* add gasPrice to updateEditableParams

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

* Remove duplicated Params in notes.

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

* A few more tests to cover if
    transaction status is not unapproved
    transaction is passed more parameters than it requires.

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

* Update EIP1559 params.

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

* Remove metrics

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

* Add updateTransactionParams to actions.js updateXXX and return txData at the end of updateXXX method

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

* Lint fixes.

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

* change method name to update editable params.

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

* lint fixes.

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

* Editable params should pass in the txParams and not the full tx object

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

* Fix jest tests

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

* lint fixes.

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

* Do not hideLoading since we're not showing it.

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

* Proper JSDOCs comments.

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

* Remove gas settings from updateEditableParams since we already have a
dedicated gas update method.

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

* Fix duplicate codes from rebasing.

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

* Lint fixes.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-03-07 23:14:48 +04:00
Brad Decker
9cea401022
extract determineTransactionType from tx controller (#13737) 2022-03-07 12:54:36 -06:00
Niranjana Binoy
4bb3ba4aef
Adding new settings dropdown for Dark mode in Experimental tab (#13097) 2022-03-07 12:53:19 -06:00
Jyoti Puri
0e421ece8e
Fix gas values display in users primary currency inside inputs (#13830) 2022-03-07 23:22:14 +05:30
dragana8
658f0be63f
Update privacy page text (#13795) 2022-03-07 11:37:54 -06:00
Niranjana Binoy
f52fbd4684
Showing new message while converting token to NFT (#13838)
* adding new message while converting token to nft if the nft is already added via nft flow.

* updating the copy

Co-authored-by: Alex Donesky <adonesky@gmail.com>

Co-authored-by: Alex Donesky <adonesky@gmail.com>
2022-03-07 10:42:22 -06:00
VSaric
bea907e437
Create password page (#13792) 2022-03-07 09:35:03 -06:00
Hassan Malik
2bc7aab402
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-07 10:32:09 -05:00
Hassan Malik
261b066fc0
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-04 12:00:51 -05:00
Ariella Vu
aa89bb189b
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:56:31 -03:00
George Marshall
395806943f
Updating colors in various components js and css (#13831) 2022-03-04 08:47:32 -08:00
Mark Stacey
68f42a2fb9
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-03 19:38:03 -03:30
Alex Donesky
039c405314
create branching logic for different types of contract interactions for identifying the contract address (#13776) 2022-03-03 13:56:20 -06:00
ryanml
52981e1967
Restoring create password form layout (#13824) 2022-03-03 13:50:58 -03:30
ryanml
ce495d7a66
Revert "Allow sending up to 15 decimals on the send screen (#12707)" (#13823)
This reverts commit 8597cd1401.
2022-03-02 17:28:56 -07:00
Jyoti Puri
6e8f4a6a76
gas fee details displayed on UI should be used gas estimates if available (#13809) 2022-03-03 05:52:46 +05:30
Frederik Bolding
b8fc1ae671
Fix currency toggle (#13813) 2022-03-02 18:57:46 +01:00
ryanml
0a01c0e260
Persisting token address via URL (Token Details page) (#13807) 2022-03-02 09:01:53 -07:00
Olusegun Akintayo
6d54897cfb
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 19:59:31 +04:00
Jyoti Puri
137b47370e
Confirm transaction page: show contract address details in title (#13683) 2022-03-02 20:56:53 +05:30
Ariella Vu
e4181ec581
ConfirmImportToken: update metrics logic (#13775) 2022-03-02 11:03:44 -03:00
George Marshall
0244c6298c
Feat/13662 box design token updates (#13725)
* Updating Box component and adding dark theme to storybook toolbar

* Updating box props table manually

* Fixing linting issues

* Updating design-tokens to v.1.3.0

* Reverting theme/background changes in .storybook/preview.js so we can use implementation in #13651

* Updating yarn.lock

* Updating titles
2022-03-01 10:23:20 -08:00
Daniel
42fd5d19f4
Content and UI updates for the STX modal (#13798)
* Update content and UI for STX modal

* Update the main header image for STX

* Capitalize Smart Transactions in the button label
2022-03-01 19:18:20 +01:00
Niranjana Binoy
96ab979e7c
UI/UX update - Error message in Import NFT (#13772) 2022-02-25 20:17:42 -05:00
ryanml
fda5b54def
Handling undefined case for token balance (Token Details) (#13759) 2022-02-25 17:00:51 -07:00
Guillaume Roux
23e6c073c4
Dark Theme setup and button theming (#13651)
* Add design-tokens and apply colors to button

* swap more colors

* tweak button and add dark theme switch to storybook

* tweak buttons

* fix typo

* remove comments

* add dep to ignored list

* fix linting issue

* fix linting issues

* Updating some styles and removing some deprecated buttons (#13742)

* Updating some styles and removing some deprecated buttons

* Warning button fixes

* Fixing warning text for darkmode

* bump design tokens and update storybook theme strategy

Co-authored-by: George Marshall <george.marshall@consensys.net>
2022-02-25 14:11:22 -08:00
filipsekulic
cdb7269443
Create 'Add network' page (#13180) 2022-02-25 10:50:16 -06:00
VSaric
bd54fafe7d
Import SRP page (#13568)
* Import SRP page

* Moved url link for SRP to the zendesk urls constant in the constants folder
2022-02-25 10:15:57 -06:00
amerkadicE
3ed08a09e4
[FIX #12760] Highlighting on search (#13730) 2022-02-24 13:06:30 -06:00
Daniel
6dd141ebfd
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-23 22:10:28 +01:00
ryanml
d4f694c49f
Fix token details icon when 'Use Token Detection' is enabled (#13726) 2022-02-23 13:43:41 -07:00
Mark Stacey
f49e5076f3
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-02-23 17:00:26 -03:30
Hassan Malik
219f8e6299
minor fixes per snaps pr comments (#13721) 2022-02-23 15:16:41 -05:00
ryanml
e600ecedbf
Fixing blockies on token detail page (#13728) 2022-02-23 11:57:16 -07:00
VSaric
a0602f1c0e
Success page (#13570) 2022-02-23 10:41:06 -06:00
VSaric
6b996a7979
Secure your wallet page (#13571)
* Secure you wallet page

* Remove seedPhraseIntroSidebarBulletThree from messages.json

* Change the second bullet from Figma design

* Requested review changes
2022-02-23 10:36:58 -06:00
Alex Donesky
7ddd8cfede
fix issue where token details page unnecessarily relies on send asset state (#13717) 2022-02-23 10:20:42 -06:00
Brad Decker
6e34b70db3
add account_type and device_model to tx metrics (#13682) 2022-02-23 09:15:41 -06:00
dragana8
662c19d4da
Implement Network specific insufficient currency warning #12965 (#13182)
* added warning

fix

added warning for send screen

fix

changed condition

fix

fixed test

review updates

* review updates

* fix

* fixed failing test

* added check for transaction type

* fixed failing unit test

* added description for localization

* review updates

* review updates
2022-02-23 11:33:01 -03:30
George Marshall
a1eaa33b45
Installing design tokens and writing docs in storybook (#13657)
* Installing design tokens and writing docs in storybook

* Adding design-tokens to dep check ignore

* Link updates, Sentence casing, better css code formatting, other grammer fixes
2022-02-22 18:26:11 -08:00
igorms-cons
f5e86d0351
Feat/settings search (#13214)
* fix error with color variable - fix rebase

* clean list search & fuse threshold decreased

* update search-icon , fix tests

* nice to have highlighting text & cleaning

* unit test on settings & search input ui up on expanded view

* fix color variable in alert scss

* setting search input padding right up

* fix dom warning

* util/search test added & Dom element warning fix

* renaming files

* fix color text in settings search

* settings search highlight text refacto & fix ui

* fix settings-search test & renaming

* Fix styling on search field for edge cases, update components and e2e

E2E tests update for search feature

Update components from class to functional component

		#

Fix storybook for search box

Fix styling

Fix unit tests

fix: remove z-index

Fix unit tests

Co-authored-by: amerkadicE <amer.kadic@endava.com>
2022-02-22 17:28:21 -03:30
Guillaume Roux
6ec07b8121
Fix permission screen overflow (#13592) 2022-02-22 13:50:28 -06:00
AndreasGassmann
355e5ab399
Add AirGap Vault detail links (#13650) 2022-02-22 13:00:51 -06:00
Archana Sankaranarayanan
575cedf2aa
Shows the sign and cancel button fully in signature page (#13686) 2022-02-22 12:37:01 -03:30
ryanml
8eb2130487
Harden keyring type check in EthOverview (#13711) 2022-02-22 09:59:31 -06:00
Niranjana Binoy
bf8f331297
Update "Forgot Password?" copy (#13493) 2022-02-22 10:45:19 -05:00
Jyoti Puri
60aa69a624
Confirm transaction page: use method name only for contract transactions (#13643) 2022-02-22 11:28:04 +05:30