1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-23 03:36:18 +02:00
Commit Graph

5267 Commits

Author SHA1 Message Date
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