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

911 Commits

Author SHA1 Message Date
Filip Sekulic
6e13524bcd
Remove related UI code from the app dir (#15384)
Co-authored-by: metamaskbot <metamaskbot@users.noreply.github.com>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
Co-authored-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-09-16 14:05:21 -05:00
ryanml
7b04bf8b47
Adding Sepolia as a default test network (#15787) 2022-09-14 13:26:45 -05:00
PeterYinusa
eb176c721b
Case insensitive modifier for Firefox (#15831)
JSON.parse: unexpected character at line 1 column 1 of the JSON data

JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
2022-09-14 18:16:21 +01:00
Dan J Miller
e5da67515c
Ensure network info popup only displays on networks where the user has no balances (#15821) 2022-09-14 10:35:59 -05:00
Dan J Miller
fc65ca63af
Ensure approval warning for setApprovalForAll is not shown when revoking (#15806)
Co-authored-by: ryanml <ryanlanese@gmail.com>
2022-09-14 10:32:04 -05:00
Brad Decker
c87980bbfe
migrate network constants to typescript (#15610) 2022-09-14 09:55:31 -05:00
Dan J Miller
0b9424acc1
Properly handle JSON errors when restoring data in advanced settings (#15815) 2022-09-13 17:59:04 -07:00
Matthew Epps
dcfe80c255
Add entry point for metalabs dapp into metamask home page (#15407)
Co-authored-by: Dan Miller <danjm.com@gmail.com>
2022-09-13 08:41:58 -05:00
Frederik Bolding
6cd18ea62b
[FLASK] Fix crash when uninstalling snap (#15799)
* Fix crash when uninstalling snap

* Run lint
2022-09-13 12:41:29 +02:00
Frederik Bolding
398b93cf51
[FLASK] Fix crash with certain permissions on the snap settings page (#15797) 2022-09-12 18:36:40 +02:00
Daniel
34e2faaf49
Replace Rinkeby with Goerli for dev testing (#15781) 2022-09-12 13:11:29 +02:00
Thomas Huang
c2218ad941
Continue rm enzyme, unit tests. (#15730)
* Convert Confirm Page Container test to tlr.

Add test ids to associated components.

* Convert Welcome component to tlr.

* Update ui/pages/first-time-flow/welcome/welcome.test.js

Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com>

* Update ui/components/app/confirm-page-container/confirm-page-container-container.test.js

Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com>

* Remove unsused, commented out, lines

Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com>
2022-09-08 10:05:15 -07:00
Daniel
fe10c35464
Preserve search query for "Swap from" and "Swap to" form fields, update content (#15758) 2022-09-08 11:31:56 -05:00
Adnan Sahovic
2dbabac599
warning for deprecated Rinkeby, Ropsten and Kovan test networks (#15725)
* warning for deprecated Rinkeby, Ropsten and Kovan test networks

* modified DeprecatedTestNetworks function

* added getCompletedOnboarding

* removed warning message from MetaMask ​​Notification page

* updated deprecatedTestNetworksMsg
2022-09-08 09:00:57 -02:30
VSaric
0b92b13def
Set view full transaction details by default (#15726) 2022-09-06 08:36:02 -05:00
Thomas Huang
ece5901b40
Unit tests for first time flow/new account and onboarding flow. (#15625) 2022-08-30 16:53:24 -07:00
Frederik Bolding
7fc418a96d
[FLASK] snaps-skunkworks@0.20.0 (#15706)
* snaps-skunkworks@0.20.0

* Generate LavaMoat policy

* Fix some breaking changes

* Update iframe execution env

* Fix unit tests

* Implement snap_getBip44Entropy

* Regenerate LavaMoat policy

* Prefer ControllerMessenger over direct calls

* Fix not showing warning for BIP44 legacy permission and E2E test

Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>
2022-08-26 13:48:53 +02:00
Filip Sekulic
47d61c6832
Token allowance improvements feature flag (#15646) 2022-08-24 11:04:36 -05:00
VSaric
9a359b87d1
Updated origin pill component to match the new design (#15603) 2022-08-24 11:02:18 -05:00
Brad Decker
0d862d4032
upgrade jest (#15642) 2022-08-23 15:13:02 -05:00
Filip Sekulic
365bf11fdd
New network info popup (#13319) 2022-08-23 10:04:07 -05:00
ryanml
4dab986ad2
Consolidating Zendesk URLs in to constants file (#15669) 2022-08-23 09:19:31 -05:00
ryanml
c6cdf924d2
Fixing Contacts breadcrumb when viewing contact details (#15663) 2022-08-22 07:40:41 -07:00
ryanml
1772deeea9
Fixing Blockies identicon option alignment (#15652) 2022-08-19 17:37:34 -07:00
Daniel
0cbff07b61
Remove unnecessary event props, update STX controller version (#15653)
* Remove unnecessary event prop
* Update STX controller version
* yarn yarn-deduplicate
2022-08-19 22:27:49 +02:00
John Brennan
1c9764a6a2
Fix onboarding events (#15608) 2022-08-18 16:31:07 -05:00
Maarten Zuidhoorn
a52c6a4908
[FLASK] snaps-skunkworks@0.19.0 (#15619)
* Bump snaps-skunkworks to 0.19.0

* Improve snap_getBip32Entropy UI

* Remove console.log

* Update LavaMoat policy

* Dedupe Yarn lock

* Update LavaMoat policy again

* Fix tests

* Update policies and e2e tests

* Update policy again

* Update iframe-execution-environment

* Dedupe yarn.lock

* Update snapshots

* Fix PR comments

* Add TODO

* Trigger CI
2022-08-18 17:07:34 +02:00
VSaric
6e0f130168
New metrics data for token approval transactions (#15289) 2022-08-18 08:49:50 -05:00
amerkadicE
f074c243d8
Fix for randomly resets of updated values in network edit form (#14370)
Code refactor

Fix test

Fix warning jank

Rerunning e2e tests

Co-authored-by: Alex Donesky <adonesky@gmail.com>
Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com>
2022-08-17 12:13:03 -05:00
Niranjana Binoy
d09bdbe3df
the token detction change affected swap performace, this is fixing it (#15607) 2022-08-17 11:38:06 -05:00
Daniel
b27672bd0e
Redirect a user to the Activity tab after they click on "View in Activity" (#15620) 2022-08-17 17:37:01 +02:00
George Marshall
0cb6fd1202
Updating Box to remove color prop default (Fixes develop) (#15613) 2022-08-17 06:02:26 -07:00
John Brennan
82368e7451
Rename some events (#15543)
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2022-08-16 11:39:23 -05:00
Thomas Huang
5b63c7adf3
Unit tests improvements (#15517) 2022-08-16 10:25:30 -05:00
Niranjana Binoy
650eac88a5
Cleanup after TOKEN_DETECTION_V2 flag removal (#15564) 2022-08-16 10:22:05 -04:00
Dan J Miller
65d2ff9c8e
Call metrics event for wallet type selection at the right time (#15591) 2022-08-15 20:12:08 -02:30
Brad Decker
74d48df235
RFC: sort keys rule and initial changes (#15534) 2022-08-15 12:41:29 -05:00
George Marshall
28440ba0d0
Adding initial and transparent to Box component (#15565)
* Adding inital and transparent to Box component. Removing deprecated secondary colors

* Fixing prop type

* Fixing story

* removing duplicate prop
2022-08-12 15:14:59 -07:00
Daniel
2eb0fe6978
Add more tracking for MetaMask (#15462) 2022-08-11 19:33:33 +02:00
George Marshall
092189cb5b
Adding polymorphic 'as' prop to Box component and updating Typography component to use the same (#15518)
* Adding polymorphic as prop to Box component

* Updating Typography component to use 'as' as the polymorphic prop instead of 'tag'

* Fixing linting
2022-08-10 12:42:42 -07:00
Niranjana Binoy
94f46fbb1e
Using Object.values for shuffle token list for swaps (#15530) 2022-08-10 15:10:41 -04:00
ryanml
3ad4ab33a8
Fix text alignment in Add a Network popup view (#15520) 2022-08-10 13:37:35 -05:00
Francis Behnen
1faace0115
Convert knobs and actions to controls/args ConfirmEncryptionPublicKey story (#14319)
* Convert ConfirmEncryptionPublicKey story to controls

* Updating fromAccount as per suggestion

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2022-08-10 08:05:34 -07:00
Niranjana Binoy
6e5c2f03bf
Token detection V2 Flag Removal and Re-introducing the use of legacy token list when token detection is OFF (#15138)
* addding the legacy tokenlist, tuning token detection OFF by default, adding new message while importing tokens

updating the controller version and calling detectNewToken on network change

fixing rebase error

Run yarn lavamoat:auto for updating policies

updating lavamoat

Deleted node modules and run again lavamoat auto

fixing rebase issues

updating lavamoat policies

updating lavamoat after rebasing

policies

updating custom token warning and blocking detectedtoken link when tpken detection is off for supported networks

to update the token in fetchTosync

updating the contract map object

Revert build-system lavamoat policy changes

Move token list selection logic from components to getTokenList selector

updating the tokenList

Update lavamoat

Fix error

updating lavamoat

lint fix

fix unit test fail

fix unit test fail

lint fix

fixing rebase locale error

rebase fix

Revert build-system policy changes

temp

addressing review comments

* rebase fix
2022-08-09 22:56:25 -02:30
Tommaso Maioli
d21a8a1cfb
docs: addition of controls and readme in SelectQuotePopover story (#15187)
* docs: addition of controls and readme in SelectQuotePopover story

* Content update

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2022-08-09 16:48:48 -05:00
Olusegun Akintayo
4f34e72085
3box Replacement (#15243)
* Backup user data

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

Tests for prependZero (utils.js)

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

Fix advancedtab test

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

backup controller tests

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

Lint fixes

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

Backup controller don't have a store.

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

Restore from file.

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

Advanced Tab tests

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

Lint fix

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

e2e tests for backup
unit tests for restore.

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

Fix comments on PR.

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

restore style

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

Lint fixes

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

We should move the exportAsFile to a utility file in the shared/ directory

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

Move export as file to shared folder

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

Refactor create download folder methods

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

Lint fixes.

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

Move the backup/restore buttons closer to 3box

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

Change descriptions
Add to search

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

refactor code to use if instead of &&

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

Lint fixes

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

Restore button should change cursor to pointer.

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

Fix restore not uploading same file twice.

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

Do not backup these items in preferences
    identities
    lostIdentities
    selectedAddress

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

lint fixes.

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

* Only update what is needed.

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

* Fixed test for search

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

* remove txError as it currently does nothing.

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

* Remove dispatch, not needed since we're not dispatching any actions.

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

* Event should be title case.

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

* Make backup/restore normal async functions
rename event as per product suggestion.

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

* Use success Actionable message for success message and danger for error
message

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

* change event name to match with backup

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

* Lint fixes

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

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

* fix e2e

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-08-09 19:36:32 +01:00
Daniel
d255fcdefb
Only check if a user has enough token balance before calling STX (#15218) 2022-08-09 12:56:52 -05:00
Justin Léger
753666d9c2
Fix connected site styling (#15409) 2022-08-09 12:29:38 -05:00
Thomas Huang
06450a4056
Various test files converting to @testing-library/react. (#15504)
* Convert End of Flow test to tlr.

* Convert Select Action test to tlr

* Convert Metametrics opt in test to tlr
2022-08-09 10:37:29 -05:00
Thomas Huang
c162d52ca3
Various test files converting to @testing-library/react. (#15470)
* Convert Menu Bar test to tlr

* Add test ids to sig req footer buttons

* Convert Sig Req to tlr

* Convert First Time Flow Switch to tlr

* Convert Lock test to tlr

* Add test id to account options menu
2022-08-08 13:28:49 -07:00
George Marshall
0692f7bf25
Updating content to sentence case and updating tests (#15285) 2022-08-08 12:01:38 -07:00
Dan J Miller
4fdbc816c0
Prevent confirm screen from showing method name from contract registry for txes created within MetaMask (#15472)
* Prevent confirm screen from showing method name from contract registry for txes created within MetaMask

* Ensure method name does not get sent in state when sending to a contract, with tx data, from metamask send screen
2022-08-04 17:20:32 -02:30
George Marshall
cdc0fed828
Update media query instances (#15068) 2022-08-04 09:03:02 -05:00
Dan J Miller
6602e4a013
Ensure smart contract interactions are properly represented on the confirm screen (#15446)
* Ensure smart contract interactions are properly represented on the confirm screen

* Fix unit tests

* Code cleanup

* Cleanup

* Code cleanup

* Fix test
2022-08-03 17:05:34 -02:30
Hassan Malik
a7179a6b88
[FLASK] Add update snap UI (#15143)
* added snap-update folder

* addded update route, snap update component, updated permissions connect components

* added actions and selectors

* updated permissions selectors and updated permissions connect container to have update snap logic

* updated translations, added selector, updated request object

* updated translations, added update snap permission list component

* more fixes

* added CSS, redid some HTML

* lint fixes

* Add missing grantPermissions action

* updated button padding

* fixes

* removed prop type

* fix Update & Install wrapping

* made changes for forthcoming snap controller PR

* removed ununsed imports

* updated css

* re-added padding rule and removed unused translation messages

* addressed comments

* add subtext for new permissions

* lint fix

* removed unused translations

* some more changes

* fix e2e tests

* lint fix

* added in delay for e2e tests

* Revert "added in delay for e2e tests"

This reverts commit 095962a2c0c9de0b0b343d3134bb0787044dd8ce.

* fixed routing logic

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
Co-authored-by: Guillaume Roux <guillaumeroux123@gmail.com>
2022-08-03 12:02:44 -04:00
ryanml
97b10f96e0
Opening Network Forms in full screen from the popup view (#15442) 2022-08-03 13:07:16 -02:30
Sam Gbafa
5802805597
Add Sign-In with Ethereum (#14438)
Co-authored-by: Gregório Granado Magalhães <greg.magalhaes@gmail.com>
Co-authored-by: George Marshall <georgewrmarshall@gmail.com>
Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com>
Co-authored-by: brad-decker <bhdecker84@gmail.com>
2022-08-03 09:56:11 -05:00
George Marshall
2e6aea412a
Moving incorrectly ordered page component to correct pages category (#15426) 2022-08-03 08:56:32 -05:00
Brad Decker
ddadc79f60
remove unnecessary usage of renderableGasButton logic (#15422) 2022-08-02 16:56:35 -05:00
Filip Sekulic
ea247d4e4a
Fix 'block link explorer on custom networks' (#13870)
* Created a logic for the 'Add a block explorer URL'

Removed unused message

Message logic rollback

Modified history push operation

WIP: Pushing before rebasing

Applied requested changes

Removed unintenionally added code

* Lint fix

* Metrics fixed
2022-08-02 16:56:02 -05:00
Alex Donesky
fb191c865b
Enhance approval screen title logic (#15406) 2022-08-02 13:38:15 -05:00
Guillaume Roux
9ce4a8f987
[FLASK] Fix key management permission copy (#14849) 2022-08-02 11:29:40 +02:00
Brad Decker
c72199a1a6
update prettier (#15360) 2022-07-31 13:26:40 -05:00
Brad Decker
8e9df0457b
cast chainId to hex for metrics (#15332)
* cast chainId to hex for metrics

* Update ui/pages/settings/networks-tab/networks-form/networks-form.js

Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com>

Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com>
2022-07-29 10:37:48 -05:00
Daniel
f31bac9fbf
Performance improvements for Swaps (#15359) 2022-07-28 15:56:15 +02:00
Dan J Miller
aea5c5824f
Clean up of code introduced with 43f7a44 (#15158) 2022-07-27 15:19:05 -05:00
Brad Decker
693a6dfc0c
Remove unnecessary file extensions (#15352) 2022-07-27 14:32:17 -05:00
ryanml
c677edc51d
[FLASK] disable "Mark all as read button" when there are no notifications (#15333)
* [Flask] disable "Mark all as read button" when there are no notifications

* Adding test case

* Addressing feedback
2022-07-27 09:49:34 -07:00
Brad Decker
652d631cda
remove exclusions for mismatched object jsdoc type casing (#15351) 2022-07-27 08:28:05 -05:00
Nidhi Kumari
7424e98416
Updated all instances of "Component API" to "Props" in storybook documentation (#15324)
* replaced Component API with Props

* replaced Component API with Props in DOCUMENTATION.stories.mdx

* removed base avatar component
2022-07-27 00:22:40 +05:30
Brad Decker
1db0ee87ec
Update Eslint and deps (#15293) 2022-07-26 13:10:51 -05:00
Dan J Miller
101fe0b27a
Metrics adjustments (#15313)
* Don't send errors to sentry if users have not opted-in to participate in metametrics

* Don't capture opt-out metrics

* Move the metrics-opt in screen to immediately after the welcome screen

* Ensure that global.getSentryState is set in the background

* Fix e2e tests after rearranging onboardin flow

* Fix unit tests

* More e2e test fixes

* Remove unnecessary wrappers around capture exception
2022-07-22 18:09:48 -02:30
Nidhi Kumari
132c1818df
added storybook controls for confirm send ether component (#15235)
* added storybook controls for confirm send ether component

* fixed lint errors

* corrected the argTypes for send-ether-storybook component
2022-07-22 10:58:37 -07:00
VSaric
f1ca3e56e7
Modify transaction type and add contract method data to metrics (#15175) 2022-07-22 12:45:04 -05:00
Nidhi Kumari
2e6f579ee5
Converted BuildQuote story to use controls and action argType (#15234)
* added build quote component

* fixed updated test-data to use Rinkeby instead of ropsten
2022-07-22 12:14:35 +05:30
George Marshall
5592687df1
Updating design tokens package and shadow values with new tokens (#15264)
* Updating design tokens v1.8 and shadows

* Adding missing stories

* Some fixes and updates to css and stories

* removing unneeded story

* Fixing story order
2022-07-21 15:43:31 -07:00
Nidhi Kumari
c85af877bd
added storybook controls for confirm deploy contract component (#15236)
* added storybook controls for confirm deploy contract component

* fixed args in confirm-deploy-contract-storybook

Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2022-07-21 14:34:13 -07:00
Alex Donesky
b2fde5114a
fix blockExplorer link on setApprovalForAll confirmation screen (#15312) 2022-07-21 14:39:55 -05:00
Frederik Bolding
9e1814952f
Fix stringified object on NFT approve screen (#15287) 2022-07-20 18:24:50 -02:30
George Marshall
05a20bb721
Add responsive props to Box component (#15106)
* Adding responsive props to Box component

* Updating margin array prop instances

* Updating padding array prop instances

* Updates to docs, tests and margin, padding instances

* Optimizing class name object

* Simplifying single value logic

* replacing for loop with switch statement

* Memoizing generateClassNames function
2022-07-20 13:47:51 -07:00
Alex Donesky
78b32153f5
show asset name instead of symbol for setApprovalForAll calls on NFT contracts where possible (#15296) 2022-07-20 13:42:57 -05:00
Filip Sekulic
7d321c48e0
Removed ui related code from shared directory (#15252) 2022-07-19 11:07:13 -05:00
Nidhi Kumari
7a3ff7e436
added storybook component for send-content-stories (#15210)
* added storybook component for send-content-stories

* added draftTransactions to storybook
2022-07-19 14:05:45 +05:30
Brad Decker
751c119d10
enable direct routing to the send page (#15259) 2022-07-18 12:01:10 -05:00
Alex Donesky
d92936475a
Fix default currency symbol for wallet_addEthereumChain + improve warnings for data that doesn't match our validation expectations (#15201)
* set more appropriate default for ticker symbol when wallet_addEthereumChain is called

* throw error to dapp when site suggests network with same chainId but different ticker symbol from already added network, instead of showing error and disabled notification to user
2022-07-18 10:59:38 -05:00
Alex Donesky
09164dcabb
Bump controllers v30.0.2 (#14906)
* bump @metamask/controllers to v30.0.2 and adapt
2022-07-18 09:43:30 -05:00
Daniel
2744eaf760
Update the "results" state if "initialResultsState" array length is different (#15270) 2022-07-18 16:30:36 +02:00
Alex Donesky
4993d28a8f
Only send the rpc origin to segment when calling trackevent for newly added custom networks (#15227) 2022-07-15 12:08:44 -05:00
Alex Donesky
cbda923c61
small approve confirmation ui fixes (#15239) 2022-07-14 13:22:12 -05:00
ryanml
959a376347
Remove 'ADD_POPULAR_NETWORKS' feature flag (#15229) 2022-07-14 08:58:34 -07:00
Filip Sekulic
6b4fa46908
Removed the Infura v3 key from rpcUrl display (#15193)
* Removed infura v3 key from rpcUrl display

* Code refactor

* Fixed error

* Prevent submission of form when editing an featured rpc and there is a chainId error

* Add optional chaining to rpcurls to prevent type errors

Co-authored-by: Dan J Miller <danjm.com@gmail.com>
2022-07-14 07:13:56 -02:30
Dan J Miller
0c163dd8aa
Show users a warning when they are sending directly to a token contract (#13588)
* Fix warning dialog when sending tokens to a known token contract address

Fixing after rebase

Covering missed cases

Rebased and ran yarn setup

Rebased

Fix checkContractAddress condition

Lint fix

Applied requested changes

Fix unit tests

Applying requested changes

Applied requested changes

Refactor and update

Lint fix

Use V2 of ActionableMessage component

Adding Learn More Link

Updating warning copy

Addressing review feedback

Fix up copy changes

Simplify validation of pasted addresses

Improve detection of whether this is a token contract

Refactor to leave updateRecipient unchanged, and to prevent the double calling of update recipient

Update tests

fix

* Fix unit tests

* Fix e2e tests

* Ensure next button is disabled while recipient type is loading

* Add optional chaining and a fallback to getRecipientWarningAcknowledgement

* Fix lint

* Don't reset recipient warning on asset change, because we should show recipient warnings regardless of asset

* Update unit tests

* Update unit tests

Co-authored-by: Filip Sekulic <filip.sekulic@consensys.net>
2022-07-13 19:45:38 -02:30
Daniel
75ac87e487
Show a block explorer URL hostname, hide token import if block explorer URL is not available (#15198) 2022-07-13 18:42:50 +02:00
Filip Sekulic
7246058797
Added metrics for adding a new network (#15176)
* Added metrics for adding a new network

* Applied requested changes

* Added missed changes
2022-07-13 11:47:13 -02:30
Dan J Miller
f785f77959
Improve confirm screen tests (#15163)
* Improve confirm screen tests

* Fix transaction controller unit test

* Fix unit test fixtures

* Fix e2e test
2022-07-12 14:50:20 -02:30
Makoto Inoue
fdd8646ce8
Support for ENS wildcard and offchain resolution (#14675) 2022-07-12 09:30:31 -05:00
Nidhi Kumari
0fd37cd5ff
removed i18nValue component (#15179)
* removed i18nValue component

* fixed bracket issue
2022-07-12 19:29:38 +05:30
Alex Donesky
4f0115fcdc
Add setApprovalForAll confirmation view (#15010)
* enhance setApprovalForAll confirmation flow

* cleanup

* address feedback
2022-07-11 18:32:55 -05:00
Justin Léger
2a73dea54d
Update confirmation screen styling (#15136)
* Added 8px of margin to the top of the network display as it was touching the edge of the view
* Removed the SiteIcon component and passed the icon url to the SiteOrigin to display the icon next to the origin.

Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2022-07-11 16:08:43 -07:00
Daniel
8cbfa2ea9e
Show a tx link and the "create a new swap" link for STX (#14995) 2022-07-11 17:53:07 +02:00
Dan J Miller
e8ea973f0f
Add feature flag to prevent add popular networks from being available on prod (#15117) 2022-07-04 12:20:37 -02:30
Brad Decker
94967072f7
Remove global transaction state from send flow (#14777)
* remove global transaction state from send slice

* fixup new test
2022-07-01 08:58:35 -05:00
Filip Sekulic
43f7a44c25
Adding popular custom network integration (#14557)
* Initial push

* Refactored the code

* Additional code

* Removed the unused message

* Added a tooltip

* Fixed tests

* Lint fix

* Added style to a tooltip

* Fix e2e test failure

* Lint fix and code revert

* Fix e2e test

* Fixed paddings

* Fixed paddings

* CSS fix

* Minified svg files

* Applied requested changes

* Fixed theme issue

* Code revert

* Added back overridden code

* Icon problem fixed

* Lint fix

* Replaced H3 with H4

* Added unit test

* Added breadcrumbs

* Added const props for networks

* Lint fix

* Lint fix

* Added toggle button for showing the custom network list and resolved few issues

* Fixed routes

* Refactored a piece of code

* Enabled searching for the newly created option

* Fixed unit test

* Updated theme
2022-06-30 13:49:07 -02:30
Dan J Miller
c3623ab729
Remove change from cb77f94 that breaks ens inputs in send flow (#15069) 2022-06-28 17:06:55 -02:30
Dan J Miller
cb77f94bc5
Ensure that addresses are properly hex-prefixed in the generate ERC token transfer functions (#15064)
* Ensure that addresses are properly hex-prefixed in the generate ERC token transfer functions

* Ensure hex-prefixed addresses in send input

* Update unit tests

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
2022-06-28 14:21:09 -02:30
Alex Donesky
5290402181
Fix tokenIds larger than MAX_SAFE_INTEGER converted to scientific notation and failing to import (#15016)
* fix tokenIds larger than MAX_SAFE_INTEGER breaking

* add tests
2022-06-27 19:31:25 -05:00
Daniel
5fa88bebce
Show how much a cancellation of a smart transaction will cost (#15011) 2022-06-22 18:58:51 +02:00
George Marshall
051254dffd
Fixing tooltip theming by enforcing default theme (#14992)
* Fixing tooltip theming by enforcing background color

* Removing wide prop
2022-06-21 09:50:44 -07:00
daniba
085126d275
Move search icon and add to storybook (#14940)
* move search icon || update imports || add to story

* Optimized svg path, updated icon api and updating colors

* update other icons

* update snapshot

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2022-06-21 10:18:35 -05:00
ricky
3d74d06f93
Add missing subtitles for secret recovery phrase (#14943)
* add missing subtitles

* Update subtitles map

* update subtitle map in onboarding v2 flow

Co-authored-by: Alex <adonesky@gmail.com>
2022-06-17 14:55:04 -04:00
George Marshall
fdf3e9d2d7
Fix/14856 network settings page (#14857)
* Removing other features code

* Improving acccessibility of check icon

* Fixing add network button footer in popover view

* Fixing unit tests
2022-06-15 13:16:53 -07:00
Daniel
ebf967562b
Remove experimental gas editing for Swaps (#14942) 2022-06-15 21:08:13 +02:00
Jordon
f5c6d0054f
Convert knobs and actions to controls/args for MainQuoteSummary (#14758)
Co-authored-by: George Marshall <georgewrmarshall@gmail.com>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2022-06-15 10:43:26 -05:00
Ariella Vu
ede801e143
MetaMetrics: fix onCancel trackEvent (#14935)
should mirror first-time-flow/metametrics-opt-in logic
2022-06-14 11:00:11 -05:00
VSaric
136218893b
Fix contact address pet name (#14613)
* The contact pet name isn't replaced by the recipients address

* Create getEnsResolutionByAddress selector and use it in the codebase

* Modified the getRecipient selector such that it returns an ens resolution as the nickname if a nickname isn't present but a ens resolution is.

* Update ui/ducks/send/send.js

Co-authored-by: Brad Decker <bhdecker84@gmail.com>

* Checked if ens resolution is present in the getRecipient selector

Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2022-06-13 11:18:33 -05:00
Alex Donesky
b170211700
Fix to infinite loading on approve screen (#14756) 2022-06-11 12:55:35 -05:00
ryanml
496d9d81c3
Fix Enhanced Gas Fee toggle setting metrics event (#14874) 2022-06-10 16:05:25 -07:00
Zachary Belford
d882835cae
Added PR feedback changes 2022-06-08 14:24:50 -07:00
Zachary Belford
8b09f84502
Linting fixups 2022-06-08 14:24:50 -07:00
Zachary Belford
93ee67eb01
Update pr based on review feedback 2022-06-08 14:24:50 -07:00
Zachary Belford
0f7bb16b9b
Update ui/pages/settings/settings.component.js
Remove the extra route

Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com>
2022-06-08 14:24:50 -07:00
Zachary Belford
5e049aabff
Remove junk from previous ticket 2022-06-08 14:24:49 -07:00
Zachary Belford
c2d5bd01c4
Changed networks tab to explicitly pass in false and fix implicit type casting 2022-06-08 14:24:36 -07:00
Zachary Belford
b76943ea18
Changed custom nonce min to a number from a string 2022-06-08 14:24:36 -07:00
Zachary Belford
29d87343fa
Changed update nickname popover to remove proptype errors 2022-06-08 14:24:35 -07:00
Zachary Belford
3665c3718d
Changed seedPhraseBackedUp to always a boolean 2022-06-08 14:24:35 -07:00
Zachary Belford
5c93ca44da
Changed asset option prop type requirements 2022-06-08 14:24:34 -07:00
Daniel
b0557daa05
Handle an RPC provider delay in Swaps (#14821)
* Return an estimated amount for a completed swap if an RPC provider has a delay

* Create a recursive function for updating post tx balance

* Add a few tests for the "getSwapsTokensReceivedFromTxMeta" fn

* Trigger Build
2022-06-08 16:32:04 +02:00
Daniel
9705531671
Reduce the default slippage from 3% to 2% (#14863) 2022-06-07 18:28:59 +02:00
Daniel
bd5d47993d
Make content changes for the STX status page, remove old content (#14805) 2022-06-07 15:42:25 +02:00
Thomas Huang
18e4af7690
Unit test proptype (#14868)
* Add missing props to advanced tab component test.

* Add icon size prop to site icon test

* Add hardwareWalletRequiresConnection prop to signature request test as a boolean

* Add setShowDetectedTokens prop to detect token test

* Set Setting description prop to be either object or string.
2022-06-06 19:30:07 -07:00
ryanml
250b3d5499
Fixing add recipient flow issue with contact list/recent recipients (#14771) 2022-06-03 15:41:05 -07:00
Frederik Bolding
239f5f7fa6
Include snap version in pill (#14803)
* Include snap version in pill

* snaps authorship styling

* styling

* Fix linting

* Fix linting

Co-authored-by: eriknson <eriks@mail.se>
2022-06-02 11:38:39 +02:00
Guillaume Roux
b599035a12
Snap notifications integration (#14605)
* begin controller implentation

* add NotificationController

* create selectors and actions

* update actions tu use forceUpdateMetamaskState

* Basic notification UI

* fix typo and remove console.log

* lint

* more css

* add notifications scroll

* add translations and fix some css

* Fix rebase and edit colors

* add flask tags

* add flask tag to routes component

* add missing flask tags

* add tests

* fix tests

* store notification expiration delay in constant

* address requested changes

* rename to unreadNotificationsCount

* add missing flask tag
2022-06-01 19:09:13 +02:00
Daniel
6dbb2c4ded
Migrate the "estimateGas" API call to "getFees" for STX (#14767) 2022-05-26 19:56:28 +02:00
Frederik Bolding
5b8a69c721
Remove site origin on snap install (#14752)
* Remove site origin on snap install

* Fix linting + storybook

* Update local snap icon

* Fix storybook build
2022-05-25 18:19:02 +02:00
George Marshall
8fcbebc546
Update design tokens library from 1.5 to 1.6 WIP (#14732)
* Updating account menu icon color

* Updating design-tokens and making appropriate updates to extension styles

* Adding more deprecated tags to colors

* Adding spinner and removing todo comment

* Remove comment

* Updates

* Updating snapshots

* More color and ui updates

* reverting transition change
2022-05-25 08:35:36 -07:00
Daniel
f6576801d4
Fix an edge case with missing top assets in Swaps (#14688)
* If there is no array of top assets in a response, use an empty array

* Set a default empty array for 2 functions, remove an unnecessary condition

* Redirect a user from Swaps to the homepage if they switch to a chain that is not supported in Swaps

* Fix errors in the UI Console when it's not a swaps chain
2022-05-24 18:30:46 +02:00
Alex Donesky
634cf70a71
Enhance reusable SiteOrigin component (#14720)
* extend and reuse SiteOrigin component
2022-05-20 09:35:18 -05:00
Thomas Huang
11831c6ae5
Add hideEstimatedGasFee prop to sort-list and select-quote-popover tests (#14725) 2022-05-19 10:43:31 -07:00
VSaric
a5e07b0f18
Chain ID field use the same color pattern as the currency symbol field warning message below (#14644) 2022-05-19 10:52:17 -05:00
Ariella Vu
9d058007cc
NetworksTab: make footer buttons nowrap (#14733) 2022-05-17 19:44:32 -05:00
dragana8
d01a2ad7e5
Overall CSS #13441 (#13902)
* styling updates

Co-authored-by: Alex Donesky <adonesky@gmail.com>
Co-authored-by: George Marshall <george.marshall@consensys.net>
Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2022-05-16 13:38:04 -05:00
Daniel
d305dcba9d
Change styles for the high price impact notification in Swaps (#14697) 2022-05-12 19:57:05 +02:00
Niranjana Binoy
6c757ab5e0
Event tracking for Token Detection V2 (#14441) 2022-05-11 16:27:58 -04:00
Erik Marks
4b2cd0ef7a
Fix Snaps view search (#14693)
Closes #14687

Snap IDs were not properly encoded (and decoded) as URI components in the Snaps view search implementation. This ensures that they are.
2022-05-11 13:14:53 -07:00
Daniel
9a153d2388
Remove gas editing in Swaps (#14673)
* Remove gas editing in Swaps

* Remove "extraApprovalGas"
2022-05-11 20:30:03 +02:00
PeterYinusa
f47d02b72a
Auto lock e2e (#14624)
* add auto lock e2e test

* fix console errors
2022-05-10 17:57:11 +01:00
Niranjana Binoy
0a10b425ea
Add New Tokens Found page (#14366) 2022-05-09 13:47:06 -04:00
Daniel
2bd7127433
Swaps / STX improvements (#14622) 2022-05-09 18:48:14 +02:00
Frederik Bolding
9e401b14bf
Simplify removeSnap functionality after snaps-skunkworks update (#14646) 2022-05-09 18:19:34 +02:00
Brad Decker
564ad2f81b
Track send flow history on txMeta (#14510) 2022-05-04 11:54:46 -05:00
David Walsh
8a71f0f008
Add search information for Theme dropdown (#14476) 2022-05-04 09:57:01 -05:00
Daniel
9daab6aa59
Disable STX if a regular tx is in progress (#14554)
* Disable STX if a regular tx is in progress

* disableStxIfRegularTxInProgress : early return

* Fix UTs

* Trigger Build
2022-05-03 17:55:41 +02:00
Alex Donesky
12a088e638
Fix browser.tab.get call (#14550)
* update to expect promise from browser api polyfill rather than pass callback
2022-04-29 09:21:06 -05:00
George Marshall
ad1abaaef4
Updating text/muted to text/alternative for select text on home screen (#14553) 2022-04-28 06:03:12 -07:00
Guillaume Roux
6309d53650
Dark Mode : Add OS option in theme selection dropdown (#14379) 2022-04-28 14:36:28 +02:00
Frederik Bolding
27ad7279cd
Rename NotificationController to AnnouncementController (#14389)
* Rename NotificationController to AnnouncementController

* Fix test

* Add test for missing NotificationController state

* Bump controllers

* Move test to correct file

* Rename config key

* Add migration 71 to list of migrations

* Fix selector after migration
2022-04-27 10:36:32 +02:00
Guillaume Roux
7a9662b88e
Add token standard to custom token details (#14506)
* use getTokenStandardAndDetails to get token standard

* remove console.log and fix test

* remove console.log
2022-04-26 12:08:14 -07:00
ryanml
0c49bc14d4
Fixing 'Learn more' casing on import token screen (#14529) 2022-04-26 10:25:07 -07:00
Alex Donesky
cf2c6a3164
show token approval details on confirm approve screen by default (#14523) 2022-04-26 10:21:52 -05:00
amerkadicE
8fef9fd8df
Update display of switching current network (#13450)
Co-authored-by: Amer Kadic <amerkadic@Amers-MacBook-Pro.local>
Co-authored-by: George Marshall <george.marshall@consensys.net>
2022-04-25 13:28:52 -05:00
Ariella Vu
78f4684b2a
MetaMetrics: Add EVENT.CATEGORIES const (#14474)
* MetaMetrics: add EVENT.CATEGORIES const

* MetaMetrics: add EVENT.CATEGORIES.INPAGE_PROVIDER

* MetaMetrics: add EVENT.CATEGORIES.AUTH

* MetaMetrics: add EVENT.CATEGORIES.ACCOUNTS pt. 1

* MetaMetrics: add EVENT.CATEGORIES.ACCOUNTS pt. 2
confirm we want to use 'Accounts' instead of 'Account'

* MetaMetrics: add EVENT.CATEGORIES.MESSAGES

* MetaMetrics: add EVENT.CATEGORIES.RETENTION const

* MetaMetrics: add EVENT.CATEGORIES.SETTINGS

* MetaMask: add missing EVENT.CATEGORIES.SNAPS

* MetaMetrics: add EVENT.CATEGORIES.WALLET const

* MetaMetrics: add EVENT.CATEGORIES.ONBOARDING const

* MetaMetrics: add EVENT.CATEGORIES.ONBOARDING
& EVENT.CATEGORIES.TRANSACTIONS consts

* MetaMetrics: use EVENT.CATEGORIES

* ducks/swaps: revert slice name

* MetaMetrics: add missing EVENT.CATEGORIES.NETWORK
2022-04-22 13:09:10 -03:00
Alex Donesky
fbeae57247
Add testnet name as prefix for native currency of preloaded testnets (#14454)
* add testnet name as prefix for native currency of preloaded testnets
2022-04-21 14:09:41 -05:00
Olusegun Akintayo
095cc94ed0
Add new token added event (duplicating the existing event structure) when collectible is manually added (#14279)
* Add new token added event (duplicating the existing event structure) when auto detection occurs for NFTs
Set source property to detected on the new token added event,
2022-04-21 13:29:39 -05:00
Dan J Miller
3ecc04e42d
Fix the alerts toggles in settings (#14498) 2022-04-21 09:48:03 -07:00
Hassan Malik
308c6e4fe3
Add snaps view search (#14419)
* add snaps view search

* add snaps view search

* fix to add in settings constants

* removed spread

* remove unused import

* add fencing

* more fencing

* ternary refactor, updated settings tests

* refactor
2022-04-19 11:08:09 -04:00
VSaric
e702da2194
Modify import SRP page (#14425)
* Modify Import SRP page
2022-04-18 15:12:16 -05:00
David Walsh
bcdd52f55a
Dark Mode: Implement Metrics (#14455) 2022-04-18 11:31:44 -05:00
Daniel
eed6ae2b8c
Swaps: Sort "token_from" dropdown tokens by their fiat value first and "token_to" by top tokens (#14436) 2022-04-15 14:57:58 +02:00
Dan J Miller
e768119dd0
Remove duplicate gas simulation error messages (#14409)
* Remove duplicate gas simulation error messages

* Fixing locales

* Fixing unit tests

* Fixing e2e

Co-authored-by: ryanml <ryanlanese@gmail.com>
2022-04-13 08:00:10 -07:00
Frederik Bolding
637a960d3c
Use correct casing for "learn more" (#14412) 2022-04-08 18:21:41 +02:00
Niranjana Binoy
89ce0cee85
Updating info ActionableMessage type to default (#14385) 2022-04-07 13:11:42 -04:00
George Marshall
9ce966ba1d
Storybook housekeeping 🧹 (#14331)
* Removing argTypes that are related to static props and don't have anything to do with the component. Also some general house keeping

* updates
2022-04-07 08:14:22 -07:00
Hassan Malik
e0e466490e
Settings search refactor (#14350)
* removed unnecessary eslint disable and removed key prop from SettingsSearchList

* removed unnecessary function, refactored settings pages to use only handleSettingsRefs

* simplified utils, removed unnecessary test

* updated usage of util functions

* fixed type error, allow for ampersand in search input

* removed unnecessary var

* fixed test

* fixes per comments

* fixed var name

* fixed property name

* changed some properties in SETTINGS_CONSTANTS to accept t param

* redid util functions

* changed from multiline comment to single line

* replace empty descriptions

* updated util logic

* fix undefined issue
2022-04-06 16:27:08 -04:00
Niranjana Binoy
07231e42b2
Update token detection logic to only control auto-detection (#14251) 2022-04-06 13:59:16 -04:00
Thomas Huang
2cd1472e3a
Fix imported component name and change size proptype type to string (#14237)
* Fix imported component name and change size proptype type to string

* Change IconTokenSearch size prop back to number and change usage to number
2022-04-05 10:48:03 -07:00
Frederik Bolding
0556feb142
Add snap version to details page (#14110)
* Start to add snap version to details page

* Show install date

* Clean up

* Address PR comments
2022-04-04 19:40:24 +02:00
ryanml
7e7b97d7c9
Improving identicon settings accessibility (#13760)
* Improving identicon settings accessibility

* Make settings keyboard accessible
2022-04-04 10:36:56 -07:00
Daniel
fc17fbe1ad
Swaps timer improvements, optional refresh rates and fix for a notification UI (#14300)
* Set up correct timer value for fetching new quotes

* Show red timer in Swaps if quotes fetching will happen in less than 10s (previously it was 30s)

* Fix a UI issue with the notification close button

* Make stx refresh rates optional, since not every network supports them
2022-04-04 15:14:50 +02:00
George Marshall
dfd3e233e8
color fix for hover on swaps quote (#14334) 2022-04-02 06:40:33 -07:00
filipsekulic
8cb1f4af2e
Renamed metametrics.new.js to metametrics.js (#14327) 2022-04-01 14:11:12 -05:00
George Marshall
e62678464c
Fix/14302 about fox logo (#14308) 2022-04-01 07:00:33 -07:00
George Marshall
8edeb9a281
Fix/14230 dark mode fixes (#14305)
* Dark mode fixes

* removing unused icon svg
2022-03-31 13:11:06 -07:00
Pieter Tolsma
cb1890d928
Convert knobs and actions to controls/args for CountdownTimer (#14222)
Co-authored-by: Pieter Tolsma <pietertolsma@Pieters-MacBook-Air.local>
2022-03-31 13:31:31 -05:00
filipsekulic
59131f5da5
Deleted the old metametrics.js (#14292) 2022-03-31 12:10:19 -05:00
VSaric
8184b150cb
Redesign screen/page "List of networks" (#13560)
Co-authored-by: George Marshall <george.marshall@consensys.net>
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
2022-03-31 09:41:39 -05:00
Niranjana Binoy
8174aaa6b5
Adjusting the padding in Alert / error state (#13819) 2022-03-31 10:02:47 -04:00
George Marshall
4bb2582200
Swaps select quote highlight fix (#14270) 2022-03-31 08:58:09 -05:00
Niranjana Binoy
9f7c4eb658
Enable Token search functionality on supported networks (#14034) 2022-03-31 09:48:05 -04:00
Olusegun Akintayo
3c2e4e9c9e
Add asset_type to 'Tokens Added' event. (#14252)
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-03-31 11:43:26 +04:00
David Walsh
00025afe4c
Dark Mode: Remove unwanted background for price quote (#14278) 2022-03-30 15:42:18 -07:00
David Walsh
9d7f4d2005
Ensure proper color for swaps edit link (#14273) 2022-03-30 14:54:25 -07:00
Olusegun Akintayo
4ac0f82125
Add token standard to Token Added event. (#14253)
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-03-31 00:25:49 +04:00
ryanml
085c9753de
Ensure Metafox follows cursor on Fetching quotes screen (#14261) 2022-03-30 10:54:01 -07:00
BoxedFruits
950de390b3
GasModalPageContainer story: convert knobs and actions to controls / args (#13516) 2022-03-30 08:46:37 -05:00
Daniel
69d7c51c56
Show STX switch for wrapping / unwrapping (#14225) 2022-03-30 10:02:55 +02:00
jesseharte
4f1cee4b87
Change over ImportToken stories to use controls instead of knobs, update props in stories (#14246) 2022-03-29 15:20:19 -07:00
Jurriaan Den Toonder
1521e63913
Change over FeeCard stories to use controls instead of knobs, update props in stories (#13766)
This PR changes over the deprecated knobs and actions in `fee-card.stories.js` to controls.
I attempted to create a `README.mdx`, but unfortunately the `<ArgsTable of={FeeCard} />` refused to render out any of the documentation comments I added to the `FeeCard.propTypes`, thus that has not been included (and no documentation has been added to the propTypes of FeeCard).

_Please note:_ currently nested arg types are not possible in StoryBook, but discussions are open: https://github.com/storybookjs/storybook/issues/11486. This means that the StoryBook shows `primaryFee`, `primaryMaxFee`, `secondaryFee` and `secondaryMaxFee`, but these are mapped to the 2 `primaryFee` and `secondaryFee` props of the component. This is visible if the developer clicks on the `Show code` button at the docs page in StoryBook.

Signed-off-by: Jurriaan Den Toonder <1493561+Fastjur@users.noreply.github.com>
2022-03-29 16:13:00 -06:00
Dan J Miller
09512c7148
Improvements for multi-layer fee UX (#13547)
* Show fiat on confirm screen on multilayer-fee network

* Disable gas editing on optimism

* Fix send max mode on optimism

* Represent layer 2 gas fee as a single value

* Hide gas fee edit UI on optimism

* Improvement multilayer-fee-message styling

* Lint fix

* Fix locales

* Remove unnecessary code change

Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2022-03-29 16:51:45 -02:30
Daniel
7cb22bd883
metaMetricsEvent -> trackEvent (#14249) 2022-03-29 19:19:40 +02:00
filipsekulic
ee89eddb82
Removed metrics event (#14042) 2022-03-29 08:46:24 -05:00
Guillaume Roux
a3ab204d11
Dark Mode: Fix some colors (#14228)
* fix some colors

* fix test and address requested changes

* address requested changes
2022-03-28 10:23:27 -07:00
Dan J Miller
b7ea820a82
Ensure only letters, numbers and spaces can be entered in settings search input (#14226) 2022-03-28 12:33:41 -02:30
ryanml
067fd78ea6
Add 'Enhanced Gas UI' setting to search index (#14206) 2022-03-28 07:50:32 -07:00
George Marshall
7f8dc260b5
Dark mode: onboarding icons and colors (#14209) 2022-03-28 09:42:09 -05:00
David Walsh
7f239997dc
Dark Mode: Remove feature flag (#14207) 2022-03-25 20:42:52 -05:00
Guillaume Roux
a7ac83f9d3
Dark Mode: Swap hex colors in ui/pages (#14214)
* swap hex colors in ui/pages

* update snapshots
2022-03-25 15:15:31 -07:00
VSaric
31f0b245c3
Fixed issue where the "lock screen" shows up briefly between the "create password" screen and the success screen (#14111)
Co-authored-by: Alex Donesky <adonesky@gmail.com>
2022-03-25 16:03:49 -05:00
George Marshall
2118b4825d
Dark mode: updating permissions redirect check icon (#14200)
Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2022-03-25 16:01:17 -05:00
George Marshall
b1cfdd2475
Dark mode: confirm approve content popout and user approve check icon (#14211) 2022-03-25 20:40:45 +01:00
David Walsh
382669bb34
Dark Mode: Remove last unused colors (#14208) 2022-03-25 14:30:36 -05:00
George Marshall
cf0bc662c1
Dark mdoe: token search icon (#14213) 2022-03-25 10:59:22 -07:00
George Marshall
53da89cea1
Dark mode: user preferenced currency eth logo (#14210) 2022-03-25 18:35:11 +01:00
Olusegun Akintayo
c54f9b3097
update gas fees (#13646)
* 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 76 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>

enforce that only the properties for the specific methid can be updated via the method.

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 more parameters to updateSwapTransaction
    approvalTxId
    estimatedBaseFee

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 Transaction Gas Fees.

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

Update gas fees in edit-gas-popover.

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

Remove metrics.

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

Update gas settings and user settings.

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

Lint fixes.

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

Fix unit tests.

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

Lint fixes.

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>

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 Transaction Gas Fees.

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

Remove metrics.

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

Update gas settings and user settings.

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

Lint fixes.

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

Fix unit tests.

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

Lint fixes.

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

Remove dup;icated method from rebase.

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

unrelated change

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

Force re-run workflow

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

Lint fix

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>

UpdateTransaction should be renamed to updateGasFees

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

updateGasFees in gas-modal-page-container.

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

fix:
    update previous gas params update method
    add types to the jsdoc comments.

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

updateTransactionGasFees should have been updatePreviousGasParams

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

Previous gas fees can be updated for confirmed transactions.

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

add updatePreviousGasParams to mocked functions.

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

Lint fixes

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

* we need to await the first dispatch before we call the second

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

* update values to make tests pass

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

* More changes to make e2e pass

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

* Need to wait a bit after save for changes to take effect.

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

* Remove merge comments.

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

* Await one dispatch before calling another

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

* We don't need goHome anymore.

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

* Tests must use async...await syntax too since we have await in the
useTranasctionFunction

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

* Add delay after button click for values to update

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

* Wait a moment after clicking save for values to update

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

* Wait after clicking save...

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

* Merge update transaction gas fees and transaction user settings
Show loading indicator on edit gas popover
Fix tests.

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

* Lint fixes

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

* Fix JSDoc

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

* updatePreviousGasParams should also return updated transaction meta.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-03-25 21:11:04 +04:00
Guillaume Roux
57818fabbe
Dark Mode: Remove ui colors (#14184) 2022-03-25 10:07:47 -05:00
George Marshall
729e89015f
Dark mode: search icon (#14201) 2022-03-25 15:22:56 +01:00
Alex Donesky
3e2506b2e4
add space between sentences in insufficient currency warning (#14019)
* add space between sentences in insufficient currency warning and add link to buy modal for all buyable networks
2022-03-25 09:02:08 -05:00
George Marshall
6688117c7e
Dark mode: Updating lock icon decrypt message (#14198) 2022-03-25 08:37:42 -05:00
VSaric
5564176d72
Remove usages of useNewMetricEvent hook (#13955) 2022-03-25 08:21:29 -05:00
Guillaume Roux
4c009d5ae5
Dark Mode : Permission flow (#14071) 2022-03-24 18:26:49 -05:00
Guillaume Roux
974491a3cf
Dark Mode: Remove white, black and gray color tokens (#14186)
* remove white, black and gray color tokens

* Update ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Add RevealSeedPhrase story

Co-authored-by: George Marshall <george.marshall@consensys.net>
2022-03-24 13:27:41 -07:00
George Marshall
fd36eea443
Dark mode: Updating all left over static hex values in scss (#14167) 2022-03-24 19:08:08 +01:00
David Walsh
d15de941e3
Dark Mode: Remove grays (#14175) 2022-03-24 09:00:15 -07:00
Olusegun Akintayo
bc8d4a3a44
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-24 13:21:22 -02:30
David Walsh
86fb8e3a41
Dark Mode: Remove Malibu (#14176) 2022-03-24 09:45:16 -05:00
David Walsh
2ab2b594ed
Dark Mode: Remove Scorpion (#14174) 2022-03-24 09:45:00 -05:00
David Walsh
dd032dc324
Dark Mode: Import Private Key Colors (#14173) 2022-03-24 09:44:40 -05:00
David Walsh
065d525d58
Dark Mode: Remove --ui-white (#14162) 2022-03-24 15:13:26 +01:00
David Walsh
0df365f895
Dark Mode: Confirm Approve Content (#14148) 2022-03-23 20:33:07 -05:00
George Marshall
351a51d4a4
Dark mode: first time flow icons (#14160) 2022-03-23 19:05:55 -05:00
George Marshall
7ffc68a518
Updating hardware wallet logos (#14163) 2022-03-23 19:05:40 -05:00
David Walsh
e3100a0efb
Dark Mode: Remove primary-1 (#14150) 2022-03-24 00:43:38 +01:00
David Walsh
5399daeeb2
Dark Mode: Remove --ui-black (#14164) 2022-03-24 00:42:26 +01:00
George Marshall
1b9243cd7e
Dark Mode: Network display fix (#14159) 2022-03-23 15:17:53 -05:00
Daniel
4c16b583c3
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-23 20:28:26 +01:00
George Marshall
386a760285
Dark mode: Updating arrows icon in build quote (#14155) 2022-03-23 12:07:29 -07:00
David Walsh
1edc475d3e
Dark Mode: Remove monzo, red, error-1 (#14153) 2022-03-23 19:01:00 +01:00
Hassan Malik
f192929a04
Add snaps search (#14100)
* added snaps routes

* changed settings search icons to font-awesome

* removed manual input of id

* added snap list to search

* removed console.logs and changed settingsRef to an array to work with settings search helper functions

* lint fixes

* updated tests

* test fix

* fixed util function

* renamed vars

* fixed spelling

* deps fix
2022-03-23 12:47:54 -04:00
Ariella Vu
28bcde5191
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-23 09:23:48 -07:00
George Marshall
4525a81389
Replacing close icon with font awesome version in settings-search.js (#14131) 2022-03-23 08:46:06 -07:00
George Marshall
8fc5266a8d
Dark mode: icons ens input (#14133)
* Dark mode ens input on send page icons convert to font-awesome

* Updating for close in dark mode
2022-03-23 08:45:52 -07:00
Guillaume Roux
8683282a6f
Dark Mode: Replace color occurences (#14112) 2022-03-23 16:43:53 +01:00
David Walsh
0ee7b0412b
Dark Mode: Encrypt / Decrypt (#14081) 2022-03-23 10:40:07 -05:00
David Walsh
a281db9e60
Dark Mode: Onboarding Flow (#14125) 2022-03-23 10:38:43 -05:00
George Marshall
3d3670e807
Dark mode: Replacing svg image with font awesome icon for main-quote-summary (#14137) 2022-03-23 16:25:28 +01:00
David Walsh
58f98f0627
Dark Mode: Settings -> Networks (#14134) 2022-03-23 16:16:15 +01:00
David Walsh
8fc502c74d
Dark Mode: Select Hardware (#14086) 2022-03-23 15:52:31 +01:00
Niranjana Binoy
2f0bc34f4e
Add token list to token details page (#14051) 2022-03-22 15:46:18 -04:00
Niranjana Binoy
90d6143071
Move Token Detection toggle to Advanced tab. (#13977) 2022-03-22 15:14:59 -04:00