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

5322 Commits

Author SHA1 Message Date
Guillaume Roux
2454bd8124
confirmation screen dark mode (#14024) 2022-03-18 14:10:20 -07:00
David Walsh
c0e930ea53
Dark Mode: Standardize error colors (#14029) 2022-03-18 15:15:41 -05:00
David Walsh
79d00f72e1
Dark Mode: Update swaps link colors (#14033) 2022-03-18 13:07:07 -07:00
Alex Donesky
8df8f81df7
Deprecate extensionizer for webextension-polyfill (#13960)
* deprecate extensionizer for webextension-polyfill

* fix tests

* remove extensionizer

* fix browser windows api calls

* fix broken on firefox

* fix getAcceptLanguages call

* update more browser apis that are now promisified

* remove unnecessary console error ignoring in e2e tests
2022-03-18 14:07:05 -05:00
ryanml
0c8c272521
Removing iconClassName prop from NetworkDisplay (#14035) 2022-03-18 10:40:44 -07:00
David Walsh
3bdfd7f6a0
Dark Mode: Settings Search Bar (#13997) 2022-03-18 12:35:43 -05:00
Alex Donesky
6fd037f1e6
fix missing insufficient funds error for token sends (#14026) 2022-03-18 11:06:35 -05:00
David Walsh
b5088f65a9
ToggleButton: Use label so users can click text (#13876) 2022-03-18 10:16:11 -05:00
Alex Donesky
e3ea4f2cd0
Fix issue where we show contract address as recipient when calling safe transfer method on erc721 or erc1155 contracts (#13535)
* fix issue where we show contract address as recipient when calling safe transfer method on erc721 or erc1155 contracts

* updates function name getTransactionData -> parseStandardTokenTransactionData, and adds documentation
2022-03-17 13:35:40 -05:00
Guillaume Roux
41974cec3b
Dark Mode : Connected account popover (#13932) 2022-03-17 19:23:56 +01:00
David Walsh
9373f51e97
Dark Mode: Swaps Colors (#13976) 2022-03-17 13:04:01 -05:00
David Walsh
b5c120c6a3
Dark mode: Settings / Contacts colors (#13988) 2022-03-17 13:03:47 -05:00
Frederik Bolding
8b9b9af13f
Add native browser notification support for Snaps (#13613)
* Initial native notification implementation

* Simplify implementation

* Implementation based on RateLimitController

* Update controllers package

* Add notification to permission list

* Wire up correctly

* Remove snap_notify from the exclusion list
2022-03-17 17:43:18 +01:00
Guillaume Roux
9626793233
Dark Mode : AddNetwork (#13999) 2022-03-17 14:40:12 +01:00
Mark Stacey
8b1230acab
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-17 08:41:50 -02:30
David Walsh
a5ee4097f5
Dark Mode: Fix Onboarding image text color (#13983) 2022-03-16 17:22:13 -05:00
David Walsh
e2a6bcfc6b
Dark Mode: ENS Input (#13984) 2022-03-16 17:21:55 -05:00
David Walsh
157c40d666
Ensure accounts still line up in dropdown (#13986) 2022-03-16 17:21:46 -05:00
David Walsh
cd4deef031
Dark Mode: Update the loading screen colors (#13987) 2022-03-16 17:21:34 -05:00
Brad Decker
116d6b0eb8
add asset_type to transactions (#13858) 2022-03-16 17:15:03 -05:00
David Walsh
383a21f735
Dark Mode: Fix colors in threedot asset menu (#13990) 2022-03-16 14:08:05 -05:00
David Walsh
4807002a5e
Dark Mode: Depost modal (#13989) 2022-03-16 14:03:23 -05:00
David Walsh
13e9a2a479
Dark Mode: Update login screeen colors (#13992) 2022-03-16 14:03:10 -05:00
Frederik Bolding
e2fd3f987f
Fix permission list shrinking with less text (#13996)
* Fix permission list shrinking with text

* Fix linting issue
2022-03-16 18:37:50 +01:00
Guillaume Roux
ad28c81a39
General backgrounds and borders design token updates (#13764)
Co-authored-by: Guillaume Roux <guillaumeroux123@gmail.com>
Co-authored-by: George Marshall <george.marshall@consensys.net>
Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2022-03-16 15:49:25 +01:00
Mark Stacey
4dee182bcb
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-16 11:06:45 -02:30
Olusegun Akintayo
e5869d6fe8
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 12:10:07 +04:00
Mark Stacey
c7fabbff87
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-15 20:42:37 -02:30
David Walsh
cd28e64539
Dark Mode: Select Account Hardware Wallets (#13917) 2022-03-15 14:35:23 -05:00
George Marshall
524ddcfaf4
Updating account and network icons (#13947) 2022-03-15 07:40:55 -07:00
David Walsh
0ab9a39c7d
Dark Mode: Update transaction detail activity log (#13919) 2022-03-15 09:38:47 -05:00
David Walsh
cd11f90f8f
Add labels to provide better accessibility during onboarding v2 (#13890) 2022-03-14 20:27:02 -05:00
David Walsh
8143222f92
Dark Mode: Fix currently selected network color (#13918) 2022-03-14 20:26:51 -05:00
Ariella Vu
69c2cd3a94
Permissions: convert hook to util (#13906)
* Permissions: convert hook into helper util
- instantiate once
- freeze
- alphabetize
- add additional comments to @param
https://github.com/MetaMask/metamask-extension/pull/13906#pullrequestreview-906554847
2022-03-14 15:26:02 -03:00
VSaric
060c6d651c
Remove usages of useMetricEvent hook (#13930) 2022-03-14 13:12:38 -05:00
Frederik Bolding
c81912f6c5
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-14 18:40:21 +01:00
Daniel
5aff1863ca
Improve slippage input validation in Swaps (#13914)
* Improve client-side validation for the slippage input

* Improve validation of the slippage input field

* Use Number instead of toNumber
2022-03-14 15:41:03 +01:00
Elliot Winkler
f8f4397339
Degrade gracefully when gas API is down (#13865)
When the gas API is down, the logic we use will no longer compute all of
the data that the gas API returns in order to reduce the burden on
Infura. Specifically, only estimated fees for different priority levels,
as well as the latest base fee, will be available; all other data
points, such as the latest and historical priority fee range and network
stability, will be missing. This commit updates the frontend logic to
account for this lack of data by merely hiding the relevant pieces of
the UI that would otherwise be shown.
2022-03-11 11:59:58 -07:00
George Marshall
8e0f71a008
Fixing dropdown caret for dark and light mode (#13911) 2022-03-11 11:09:15 -06:00
David Walsh
a6924b1224
Dark Mode: Import account text field (#13909) 2022-03-11 10:45:26 -06:00
David Walsh
b0c050fece
Dark Mode: Create Theme-friendly top left logo component (#13897)
Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2022-03-11 10:45:13 -06:00
Ariella Vu
fa15b32fab
ConfirmAddSuggestToken: replace mapDispatchToProps & mapStateToProps; Add Tests (#13526)
* ConfirmAddSuggestedToken: component.js -> .js

* replace mapStateToProps w/ useSelector
ConfirmAddSuggestedToken

* replace mapDispatchToProps w/ useDispatch
ConfirmAddSuggestedToken

* ConfirmAddSuggestedToken: useHistory

* ConfirmAddSuggestedToken: revert scss
reuse ConfirmImportToken styles for now

* ConfirmAddSuggestToken: add tests

* ConfirmAddSuggestedToken: rm unused controls

* ConfirmAddSuggestedToken: rm snapshot

* use `metamark.svg` instead of `metamask.svg`

* ConfirmAddSuggestedToken: update useSelectors

* Revert "ConfirmAddSuggestedToken: revert scss"

This reverts commit 07aed4576caaf247cb38ad481d79a339ba3d3947.

* ConfirmAddSuggestedToken:  === undefined
w/ strict mode

* ConfirmAddSuggestedToken: use useNewMetricEvent

* ConfirmAddSuggestedToken: run useEffect once

* ConfirmAddSuggestedToken: rm unused async

* ConfirmAddSuggestedToken: rm mock redux store

* ConfirmAddSuggestedToken: duplicate ConfirmImportToken styles

* ConfirmAddSuggestedToken: update metrics logic

* ConfirmAddSuggestedToken: metricEvent-> trackEvent

* ConfirmAddSuggestedToken:clean useEffect w/ new fn
- PR suggestion: https://github.com/MetaMask/metamask-extension/pull/13526#discussion_r818007393

* ConfirmAddSuggestedToken: rm unused .token-balance styles
2022-03-10 23:40:06 -03:00
Shane
1f55af3151
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-10 14:01:55 -08:00
André Ogle
0e41bd4399
Use pre-wrap instead of pre for signature content (#13828) 2022-03-10 18:12:35 -03:30
David Walsh
4dc47025bf
Dark Mode: Dropdown color updates (#13875) 2022-03-10 14:36:15 -06:00
George Marshall
a056baf944
Updating ActionableMessage to use theme colors (#13899) 2022-03-10 12:35:56 -08:00
Shane
adce5c558d
Fixed serialization of error parameter for rejectPendingApproval across JSON-RPC (#13847)
* Fixed serialization of error parameter for rejectPendingApproval across JSON-RPC

* Fixed linting

* Added serialize error to add-ethereum-chain
2022-03-10 09:55:25 -08:00
Ariella Vu
f09459cb84
ConfirmImportToken: rm unused .token-balance style (#13900) 2022-03-10 14:15:28 -03:00
ryanml
ea97e6bb7c
Renaming test file (#13905) 2022-03-10 11:08:26 -06:00
Frederik Bolding
0d961a655e
Fix permission site origin overflow (#13868)
* Fix permission site origin overflow

* Standardize connect flow a bit

* Another standardization change

* Fix another chip width issue

* Standardize snap install

* Fix lint

* Fix overflow after rebase
2022-03-10 18:03:32 +01:00
filipsekulic
c439953d94
Fixed issues in onboarding flow (#13826) 2022-03-10 10:33:53 -06:00
David Walsh
5275ec6ac6
Implement Dark Mode Form Fields (#13821) 2022-03-10 10:10:07 -06:00
Daniel
93f03c5541
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:47:57 -03:30
Olusegun Akintayo
e157d2b51f
Dev olu update swap approval transaction (#13641)
* Draft methods to brak updateTransaction into smaller more targeted
methods.

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

* This is a combination of 52 commits.

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>

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>

Update swap approval transaction

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

1. updateSwapApprovalTransaction should have id as first parameter
2. updateSwapApprovalTransaction should not show loading indicator

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

update swap transaction.

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

Remove metrics code.

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>

Fix swapApprovalTransaction update to use same return method as swap
update
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

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>

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>

Update swap approval transaction

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

1. updateSwapApprovalTransaction should have id as first parameter
2. updateSwapApprovalTransaction should not show loading indicator

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

update swap transaction.

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

Remove metrics code.

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>

Fix swapApprovalTransaction update to use same return method as swap
update
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

Remove duplicate tests

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

Remove comments.

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>

...approveTxMeta no longer needed here.

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

Remove estimated base fee from swap approval txs.

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

remove txTradeMeta from params
make sure rebase didn't mess up any code - first pass

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

Lint fixes

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-03-09 23:01:04 -03:30
Alex Donesky
c77f736378
fix small bug where max transaction fee isn't properly passed through confirmation screen flow (#13893) 2022-03-09 16:13:26 -06:00
Hennadii Ivtushok
c666849c31
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-09 22:20:48 +02:00
George Marshall
fa4d884a87
Find and replace of all typography colors to design tokens (#13885) 2022-03-09 07:24:53 -08:00
Alex Donesky
3747ace06b
Refactor token send/method confirmation flow (trimmed down) (#13788)
* make use of getTokenStandardAndDetails method exposed on assetsContractController to determine how to represent the contract being interacted with in token contract method calls
2022-03-09 08:38:12 -06:00
Alex Donesky
1be1cb0c85
fix bug in NFT dropdown state management (#13880) 2022-03-08 21:06:09 -06:00
David Walsh
cf46dbf654
Ensure only accounts list scrolls in Permissions popup (#13859)
Co-authored-by: ceamkrier <ceamkrier@gmail.com>
2022-03-08 17:06:05 -06:00
George Marshall
55abc00c34
Updating all caret icons for dark mode 🥕 (#13861)
* Updating all caret icons

* lint fixes

* Fixing settings search list
2022-03-08 13:50:35 -08:00
George Marshall
1607295feb
Updating AccountList to use darkmode colors (#13864) 2022-03-08 11:06:45 -08:00
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