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

15412 Commits

Author SHA1 Message Date
Garrett Bear
d25f9cf4da
UI-14395: typography v2 (#15408)
UI-14395: change Typography v2 to Text

UI-14395: upgrade design tokens

UI-14395: add classname testing

UI-14395: update text colors, update font family name to match token, update text storybook boxprops

UI-14395: add text transform docs

lint fix
2022-08-18 10:51:53 -07:00
Nidhi Kumari
119a5a4dc4
added avatar token component (#15466)
* added avatar token component

* added avatar token component story

* added avatar token readme to story

* added avatar token readme to story

* added halo effect

* added test to avatar token component

* fixed alt name

* added test for blur

* added test for aria hidden element

* fixed fallback issue

* updated halo id in README

* added changes to avatar token stories

* updated stories and README in storybook

* fixed indentation in stories

* changed component name structure

* updated css for avatar halo image

* updated README for Avatar Base Component

* added className to avatar Token

* Updates to docs and styles

* fixed tests for Avatar Token

* added color to the props

* fixed table props issue

* updated avatar token Readme

* updated args in avatar token stories

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2022-08-18 22:00:19 +05:30
Dan J Miller
ce35a204b2
Fix setting of gasPrice when on non-eip 1559 networks (#15628)
* Fix setting of gasPrice when on non-eip 1559 networks

* Fix unit tests

* Fix logic

* Update ui/ducks/send/send.test.js

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2022-08-18 13:33:23 -02:30
Ariella Vu
34eeea26f3
Fix Signature Request styles (#15621)
* SignatureRequestOriginal: fix collapsing ui

* SignatureRequestOrigin: fix collapsing icon
2022-08-18 23:54:44 +08: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
George Marshall
fc23cff03c
Adding BaseIcon UI component (#15609)
* Adding BaseIcon component

* Updates to styles, docs and proptypes

* Updating box props link
2022-08-18 07:53:01 -07:00
VSaric
6e0f130168
New metrics data for token approval transactions (#15289) 2022-08-18 08:49:50 -05:00
seaona
7aadddc81e
Send to Contract ganache refactor (#15605) 2022-08-18 10:26:14 +02: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
seaona
71b3f01db5
Refactor failing contract with ganache seeder (#15601) 2022-08-17 17:02:06 +02:00
George Marshall
0cb6fd1202
Updating Box to remove color prop default (Fixes develop) (#15613) 2022-08-17 06:02:26 -07:00
Taylor Monahan
b9c301abfd
Update readme with some more docs and visuals of codebase (#15577)
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2022-08-16 11:39:38 -05:00
John Brennan
82368e7451
Rename some events (#15543)
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2022-08-16 11:39:23 -05:00
seaona
8464ed150c
[e2e] Refactor contract-interactions spec using Ganache seeder (#15553)
* Include contract deployment from background on Contract Interactions specs

* Deploy piggy contract

* Fix lint

* Make sure button is clickable

* Wait for deployed contract

* Fix lint

* Changed hardcoded Smart Contract string for imported constant
2022-08-16 17:25:51 +02:00
Thomas Huang
5b63c7adf3
Unit tests improvements (#15517) 2022-08-16 10:25:30 -05:00
Jyoti Puri
eb85fc266d
Refactoring isManifestV3 variable (#15568) 2022-08-16 20:51:42 +05:30
Brad Decker
f008c50bbd
Add initial Typescript Files (#15596) 2022-08-16 10:15:29 -05:00
Niranjana Binoy
650eac88a5
Cleanup after TOKEN_DETECTION_V2 flag removal (#15564) 2022-08-16 10:22:05 -04:00
Jyoti Puri
1a8d0c91f0
Fix rpc and tests (#15570) 2022-08-16 18:21:35 +05:30
Jyoti Puri
d2fc5ecc3e
Make add new account idempotent operation (#15566) 2022-08-16 11:42:00 +05:30
Dan J Miller
65d2ff9c8e
Call metrics event for wallet type selection at the right time (#15591) 2022-08-15 20:12:08 -02:30
Dan J Miller
6855b06e13
Prevent type error in catch block in account-tracker.js _updateAccount (#15589) 2022-08-15 15:28:56 -02:30
Brad Decker
74d48df235
RFC: sort keys rule and initial changes (#15534) 2022-08-15 12:41:29 -05:00
David Walsh
9cf358a82a
Fix #14846 - Inject provider for MV3 via app-init (#15448) 2022-08-15 11:26:13 -05:00
Alex Miller
b29aa44a64
[GridPlus] Bumps gridplus-sdk to v2.2.4 (#15561) 2022-08-15 09:53:56 -05:00
Niranjana Binoy
8949f36639
Updating useMemo dependency list (#15572) 2022-08-15 09:25:57 -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
seaona
437acdb74c
Capture user actions times for MV2 benchmark and generate artifacts (#15353)
* User actions benchmark and artifacts

* Lint and fix identation

* Fix lint

* Updated path

* lint

* Add user actions benchmark to pre release job

* Remove title

* Out path updated

* See if url is finally fixed

* Adding some console logs

* lint

* fix lint

* fix lint

* Updated persisting and store artifacts path

* Added MetaMask bot correct link and remove console logs

* Remove console log

* Sort Imports

* Fix lint

* Update loadAccount function and prop name for clarity to loadNewAccount

* Run yarn setup

* Fix yarn

* Update Create Account element for Create account

* Remove unnecessary step on send

Co-authored-by: Jyoti Puri <jyotipuri@gmail.com>
2022-08-12 19:41:20 +02:00
Nidhi Kumari
23b882449f
added color prop to Box component (#15507)
* changed bordercolors, colors, backgroundcolors to use lodash object

* fixed merge conflicts

* fixed merge conflicts

* replaced colors with TextColors

* fixed readme and storybook for box props

* added text colors

* fixed readme conflicts

* added Inherit to the design system colors

* added bordercolor, background color, text color to design-system

* updated design system import in box component
2022-08-11 12:22:06 -07:00
Daniel
2eb0fe6978
Add more tracking for MetaMask (#15462) 2022-08-11 19:33:33 +02:00
seaona
86f02e4fd5
[e2e] Enabling/Disabling token conversion on testnets (#14649)
* E2e test for advanced settings: show conversion on test networks

* Lint fix

* Complete testnet conversion for all testnets

* Lint fixes

* Add custom error messages for each assert

* Removed delays

* Fix testcase

* Test only local network

* Mock API response for ETH USD price rate

* Remove unnecessary awaits

* Lint fix

* FindElement by its text on secondary currency

* Add missing awat for getText
2022-08-11 17:02:19 +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
Elliot Winkler
024b41546b
Fix deployment of TS migration dashboard (again) (#15528)
An improper deploy key was used to deploy the TypeScript
migration dashboard. A new key has been created on the GitHub side for
the `metamask-extension-ts-migration-dashboard` repo and also added to
CircleCI. The new fingerprint for this key is provided in this commit.
This should hopefully make it possible for us to deploy to this repo
from CircleCI.
2022-08-10 12:38:43 -06:00
ryanml
3ad4ab33a8
Fix text alignment in Add a Network popup view (#15520) 2022-08-10 13:37:35 -05:00
Elliot Winkler
2dc8ba32da
Fix deploying the TS migration dashboard (#15516)
When the TypeScript migration dashboard is updated, it is built and
deployed in another repo, which is then deployed via GitHub Pages. To
push to this repo we have to set a Git username and email. This is
missing from the CircleCI config, so this commit uses the metamaskbot
GitHub account to do that.
2022-08-10 09:45:21 -06: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
Ariella Vu
422aef569a
ConfirmPage: update UI for setApproveForAll transactions to better warn users of the allowances (#15512)
* ConfirmPage: setApproveForAll use danger-primary

* ConfirmPageContainer: add setApprovalForAll dialog
- https://consensys.slack.com/archives/GTQAGKY5V/p1660061693528129
- temp UI to add protections for user until new redesign is implemented

* ConfirmPageContainer: use px instead of rem

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

* ConfirmPageContainer: update SetApprovalForAll msg

Co-authored-by: George Marshall <george.marshall@consensys.net>
2022-08-10 22:54:44 +08: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
Elliot Winkler
a7d98b695f
Add TypeScript migration dashboard (#13820)
As we convert parts of the codebase to TypeScript, we will want a way to
track progress. This commit adds a dashboard which displays all of the
files that we wish to convert to TypeScript and which files we've
already converted.

The list of all possible files to convert is predetermined by walking
the dependency graph of each entrypoint the build system uses to compile
the extension (the files that the entrypoint imports, the files that the
imports import, etc). The list should not need to be regenerated, but
you can do it by running:

    yarn ts-migration:enumerate

The dashboard is implemented as a separate React app. The CircleCI
configuration has been updated so that when a new commit is pushed, the
React app is built and stored in the CircleCI artifacts. When a PR is
merged, the built files will be pushed to a separate repo whose sole
purpose is to serve the dashboard via GitHub Pages (this is the same
way that the Storybook works). All of the app code and script to build
the app are self-contained under
`development/ts-migration-dashboard`. To build this app yourself, you
can run:

    yarn ts-migration:dashboard:build

or if you want to build automatically as you change files, run:

    yarn ts-migration:dashboard:watch

Then open the following file in your browser (there is no server
component):

    development/ts-migration-dashboard/build/index.html

Finally, although you shouldn't have to do this, to manually deploy the
dashboard once built, you can run:

    git remote add ts-migration-dashboard git@github.com:MetaMask/metamask-extension-ts-migration-dashboard.git
    yarn ts-migration:dashboard:deploy
2022-08-09 14:16:08 -06:00
George Marshall
3694afd41e
Fixing design system icon alternative color const (#15513) 2022-08-09 13:03:25 -07:00
kumavis
a86630de3d
deps - patch ethereumjs-util/dist/secp256k1 for fast module init via lazy loading (#14682)
Co-authored-by: Alex Donesky <adonesky@gmail.com>
2022-08-09 13:40:33 -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
ryanml
67a7483754
Adding option to update lavamoat policies in parallel (#14536)
Co-authored-by: brad-decker <bhdecker84@gmail.com>
2022-08-09 11:08:34 -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