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

6765 Commits

Author SHA1 Message Date
George Marshall
abd6df72c6
Improving code formatting in component-library readme (#18910) 2023-05-02 09:50:37 -05:00
Mark Stacey
88ae10418b
Expand usage of getProviderConfig selector (#18906)
The `getProviderConfig` selector is now used anywhere the `provider`
state was previously referenced directly. This was done to simplify
renaming this state from `provider` to `providerConfig` in a later PR.

Note that there are many opportunities left to use more-specific
selectors (e.g. `getChainId()` over `getProviderConfig().chainId`), but
that was intentionally omitted from this PR to reduce the size. I
started going down this path and it quickly exploded in scope.

Relates to #18902
2023-05-02 10:06:24 -02:30
George Marshall
2face84177
Adding deprecation notice to old Button component (#18908) 2023-05-02 03:05:08 -07:00
Harsh Shukla
1478e83b08
Part of #17670: Replace Typography with Text component for 'review-spending-cap' & 'tooltip.stories'. (#18839)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-05-02 15:17:00 +05:30
Ariella Vu
a5d7cf3319
Transaction cleanup and fix TransactionDetailItem key not unique bug (#18899)
* TransactionDetailItem: allow empty detailText

* TxDetailItem: fix keys; ensure unique keys
2023-05-02 00:42:59 -03:00
Harsh Shukla
36092571c6
Part of #17670 Replace Typography with Text component in: signature-request-siwe-tag\index.js (#18898) 2023-05-01 17:51:24 -07:00
Harsh Shukla
f5f2e2e35f
Part of #17670 , #18714 & #18651 for 3 files. (#18752)
* Adding strong tag support for Text component

* Update build-quote.js

* Update awaiting-signatures.js

* Used <strong> tag in a better way.

* Remove <strong> tag from file: awaiting-signatures.js

Co-authored-by: Danica Shen <zhaodanica@gmail.com>

* Update awaiting-signatures.js

* Update ui/components/component-library/text/text.scss

Co-authored-by: George Marshall <georgewrmarshall@gmail.com>

* Update ui/pages/swaps/build-quote/build-quote.js

Co-authored-by: George Marshall <georgewrmarshall@gmail.com>

* Removing unintended UI and strong css from Text component

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: Danica Shen <zhaodanica@gmail.com>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
Co-authored-by: George Marshall <georgewrmarshall@gmail.com>
Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2023-05-01 17:48:58 -07:00
Harsh Shukla
32a7f0fe09
Update pin-extension.js (#18877) 2023-05-01 17:39:56 -07:00
Harsh Shukla
262a291185
Part of #17670 Replace Typography with Text component in: nft-default-image.js (#18894)
* Update nft-default-image.js

* Update nft-default-image.test.js.snap
2023-05-01 17:35:44 -07:00
Mark Stacey
f765b8c9b9
Refactor provider config selector (#18905)
The provider configuration selector has been renamed from `getProvider`
to `getProviderConfig`, and it has been moved from the selectors module
into the MetaMask slice. A JSDoc description has been added as well.

This refactor was done to make a future PR simpler, and to make this
selector better aligned with best practices.

This relates to #18902
2023-05-01 21:04:43 -02:30
Jyoti Puri
4bad30c94d
Show gas warning for legacy networks also (#18871) 2023-05-01 20:33:32 +05:30
Albert Olivé
8193a4999c
Added code fences (#18872) 2023-05-01 15:59:35 +02:00
Harsh Shukla
7b323b8a30
Part of #17670: Replace Typography with Text component for 11 files. (#18837)
* Part of #17670: Replace Typography with Text component for 10 files.

* Update radio-group.component.js

* Update create-password.test.js.snap

* Update custom-spending-cap.test.js.snap

* Update add-network-modal.test.js.snap

* Update recovery-phrase-reminder.js
2023-04-28 16:18:46 -07:00
George Marshall
1ff437d356
Adding new icons (#18870) 2023-04-28 12:29:58 -07:00
David Walsh
27b2993cae
UX: Multichain: Set a maximum width on the network picker (#18731)
* UX: Multichain: Set a maximum width on the network picker

* Fix jest

* Document the max-width

* Adding code example to README

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2023-04-28 12:20:55 -05:00
Albert Olivé
26f0cbe293
[MMI] Adds custodian icon next to metafox (#18851)
* Finished adding custodian icon next to metafox

* Fixed image path

* Fixed comments in PR
2023-04-28 14:23:56 +02:00
Albert Olivé
b695901ff4
[MMI] Add the custody status text in the transaction status (#18797)
* Added code fences

* Added code fencing

* Improved code readable and added more tests

* Improved tests

* Remove code from other PR

* Fixing code fences
2023-04-28 09:11:16 -02:30
António Regadas
a501ce0f3d
[MMI] adds some constants and necessary routes (#17868)
* MMI adds constants and routes

* MMI lint fix

* prettier
2023-04-28 10:52:12 +01:00
Albert Olivé
49f01406c4
[MMI] Added confirm-remove-jwt component (#18186)
* Added confirm-remove-jwt component

* changing folder directory

* Fixed lint issues

* Added story

* Fixed confirm remove jwt imports

* Fixed import

* Finished implementing component

* Fixed capitalize eslint problem

* Fixed PR suggestions

* Changed CustodyAccountList import

* updated snapshot

* Fixed typo

* Moved folder to confirm-remove-jwt-modal

* added index

* Adding filter first
2023-04-28 11:01:40 +02:00
Jyoti Puri
9d794e97b3
Fix in approve header to show correct account name (#18849) 2023-04-28 13:29:53 +05:30
Garrett Bear
89d4038351
deprecation notice (#18859) 2023-04-27 16:28:39 -07:00
Niranjana Binoy
94a2325ae0
Adding price checker deactivation for Optimism (#18833) 2023-04-27 13:18:32 -04:00
f6210927dd
Part of #17670: Replace Typography with Text component in RecoveryPhraseReminder (#18639)
* add story

* replace Typograhy with Text

* import ordering

* FONT_WEIGHT → FontWeight

---------

Co-authored-by: Danica Shen <zhaodanica@gmail.com>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2023-04-27 17:06:49 +01:00
Nidhi Kumari
f7e7ff96c0
Ux Multichain: Hide search input for single account (#18798)
* hide search input for single account

* updated test for single account with no search

* nit fix

* nit fix

* added search test for more than one account

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-27 10:45:11 -05:00
David Walsh
e339afce7a
UX: Multichain: Analytics (#18674) 2023-04-27 09:28:08 -05:00
António Regadas
e6455e92ae
[MMI] custody page component (#18688) 2023-04-27 12:27:31 +02:00
David Drazic
c450fae84f
Update Snaps icon in settings search and fix missing icon (#18803)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-27 10:49:49 +02:00
Albert Olivé
4c9bf40688
[MMI] Add interactive-replacement-token-page (#18683)
* Initial commit

* converted the component from class-based to functional.

* Refactored component

* Improved code and tests

* Finished adding tests

* Fixed eslint problems

* Added back custodyLabels component

* Fixed eslint problems

* fixed ts lint problem

* Fixed eslint problems

* Added more tests and improved code

* Added comments

* Fixed eslint problems

* Fixed eslint problems
2023-04-27 10:45:37 +02:00
Jyoti Puri
e0919d529e
Fix for wrong type being assigned to the transaction (#18818)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-27 13:46:36 +09:00
Garrett Bear
70ee78757b
Strong tag support in Text component (#18816)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-26 14:46:03 -05:00
Hakeemullah J. Yousufzai
1f0c0d041c
Update Button prop name type to variant (#18774)
* Update Button prop name type to variant

* fix: lint errors on running test cases

* change remaining files

* change typo: BUTTON_VARIANTS to BUTTON_VARIANT

* fix: button.test.js lint errors

* update: button instances & import in remaing files

* fix: prettier warnings

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2023-04-26 11:17:25 -05:00
Harsh Shukla
a6d7c436bc
Part of #17670 for file: detected-token-ignored-popover.js (#18738)
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2023-04-26 10:25:18 -05:00
Digvijay Pundir (DJ)
d428a4895f
Update knobs to control: MetamaskTemplateRenderer (#18677)
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2023-04-26 10:13:14 -05:00
OGPoyraz
6d0f3a0b26
Consume Decrypt Message Manager from @metamask/message-manager (#18379) 2023-04-26 17:02:33 +02:00
David Walsh
755b6b5667
UX: Remove Goerli buy link and disable button (#18137)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-26 08:35:28 -05:00
David Walsh
062a8b376f
UX: Multichain: Fix Network Picker when Test Networks Disabled (#18694) 2023-04-26 08:22:18 -05:00
David Walsh
15d64b6467
UX: Multichain: Focus on account search when menu appears (#18705)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-26 08:18:48 -05:00
Jyoti Puri
82a64195a2
Enable editing L2 gas on optimism (#18217) 2023-04-26 05:43:38 +05:30
George Marshall
6a78592af6
Adding ModalHeader component and updating PopoverHeader stories (#18311) 2023-04-25 14:27:54 -07:00
David Walsh
ea872946cd
UX: Multichain: App header cleanups (#18627)
* UX: Multichain: App header cleanups

* Fix snapshot

---------

Co-authored-by: David Walsh <davidwalsh83@gmail>
2023-04-25 13:39:54 -07:00
David Walsh
c9336a2ab5
UX: Multichain: Use correct blockie or jazzicon in the account menu (#18782) 2023-04-25 15:01:56 -05:00
Harsh Shukla
ab3e3976e6
Part of #17670: Replace Typography with Text component for networks-list.js (#18754)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-25 12:49:02 -05:00
Guillaume Roux
6126c156ea
[FLASK] Expanded Snap authorship (#18775) 2023-04-25 19:20:37 +02:00
Olaf Tomalka
95c37e1ba3
feat: add yaml feature management (#18125)
* feat: add yaml feature management

Add yaml feature file per build type.
Also add method to parse yaml and set
enabled features env to true. The build
process will then replace any process.env[feature]
that exists on the config by its value

* chore: add example for desktop

* Added initial draft of build features

* [TMP] Sync between computers

* Is able to succesfully build stable extension with snaps feature

* Removing var context from builds.yml

* Add asssets to builds.yml

* Minor bug fixes and removing debug logs

* [WIP] Test changes

* Removed TODOs

* Fix regession bug

Also
* remove debug logs
* merge Variables.set and Variables.setMany with an overload

* Fix build, lint and a bunch of issues

* Update LavaMoat policies

* Re-add desktop build type

* Fix some tests

* Fix desktop build

* Define some env variables used by MV3

* Fix lint

* Fix remove-fenced-code tests

* Fix README typo

* Move new code

* Fix missing asset copy

* Move Jest env setup

* Fix path for test after rebase

* Fix code fences

* Fix fencing and LavaMoat policies

* Fix MMI code-fencing after rebase

* Fix MMI code fencing after merge

* Fix more MMI code fencing

---------

Co-authored-by: cryptotavares <joao.tavares@consensys.net>
Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2023-04-25 16:32:51 +02:00
Albert Olivé
4df363b251
[MMI] Created custody-confirm-link-modal component (#18632)
* Created custody-confirm-link component

* Removed selector

* Finished component

* Changed button to use design system

* Fixed eslint issue

* updated snapshot

* fixed eslint problems

* Added more tests and added color design systems

* Fixed comments

* Removed unnecessary code

* Removed unneeded code and fixed eslint issues
2023-04-25 08:39:16 -05:00
Monte Lai
cbe438e704
Update keystone links (#18792)
* update keystone links

* update tests

* fix lint
2023-04-25 21:33:43 +08:00
Harsh Shukla
d403219210
Part of #17670 for file network-statistics.js (#18644)
* Part of #17670 Replace Typography with Text component.

* Worked on the mentioned lint issues.

* Upgrading to enum version.

Co-authored-by: George Marshall <georgewrmarshall@gmail.com>

* Upgrading to enum version.

Co-authored-by: George Marshall <georgewrmarshall@gmail.com>

---------

Co-authored-by: George Marshall <georgewrmarshall@gmail.com>
Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-04-25 08:28:22 -05:00
Harsh Shukla
19d6962957
Update slippage-buttons.js (#18745)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-25 08:28:03 -05:00
Harsh Shukla
935831658f
Update fee-card.js (#18746)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-25 08:27:46 -05:00
Harsh Shukla
c972900928
Update settings-tab.component.js (#18753)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-25 08:27:19 -05:00
Harsh Shukla
9967b50015
Worked on #17670 & #18714 for 7 files. (#18789)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-25 08:26:58 -05:00
David Drazic
41cf85e201
[FLASK] Update permissions to use IconName and IconSize design system enum (#18786)
* Update permissions to use IconName and IconSize design system enum approach

* Update webassembly to use IconName enum
2023-04-25 13:09:40 +02:00
Shane T
16dabdf802
[MMI] Adds a warning if message signing account mismatches selected account (#18659)
* [MMI] Adds a warning if message signing account mismatches selected account

* chore: fix code fencing

* chore: remove render method to simplify

* chore: remove renderMethods
2023-04-25 12:47:12 +02:00
Bernardo Garces Chapero
c1614ec670
Approvals selector refactor (#18664) 2023-04-25 10:47:49 +01:00
legobeat
64d4bfbbe9
Use SIWE origin validation logic from @metamask/controller-utils (#18518)
* feat: use SIWE origin domain validation from @metamask/controller-utils
* deps: @metamask/controller-utils@3.2.0->3.3.0
2023-04-25 17:25:58 +09:00
Thomas Huang
e65b955b19
Unit tests for various modals (#18115)
* Unit tests for Hide Token Confirmation modal

* Unit test for Export Private Key modal

* Unit test for Customize Nonce modal

* Bump coverage targets

---------

Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2023-04-24 09:55:32 -07:00
David Drazic
6f2a5faaea
Fix missing icon for webassembly endowment (#18781) 2023-04-24 18:37:12 +02:00
Harsh Shukla
9fcbc554b0
Some linting issues in the file custom spending cap tooltip.js (#18687)
Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-04-24 10:52:57 -05:00
David Walsh
9ddbd9b4e7
Fix ICON_NAMES error for snaps settings (#18784) 2023-04-24 13:17:32 -02:30
Garrett Bear
3e520214c9
update icons to ts enum version (#18698)
Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
Co-authored-by: George Marshall <george.marshall@consensys.net>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-24 09:19:19 -05:00
David Drazic
05dcff85a6
[FLASK] Fix text selection bug in snap ui (#18719)
* Fix text selection bug in snap ui

* Fix template mapping calls in other places

* Fix template mapping calls in snap-prompt
2023-04-24 12:56:44 +02:00
David Drazic
ff96836871
[FLASK] Add updated version of the Snaps settings UI (#18438)
* Add updated version of the Snaps list UI

Add more changes to match the designs of snaps list

Add next design iteration for snaps list

Update icons, sizes and pointer behaviour

Add redesign for snap settings page

Refactor and improve designs

Fix unit tests and refactor code

Fix e2e test

Fix lint

Update margin values

Add CSS override for connected sites list and update margins

Update paddings as requested

Fix vertical alignment of links

Fix tooltip position on the enable button

Add usage of getSnapName function for displaying snap names

Fix e2e tests and update date format for snap install date

Improve unit test for snap-settings-card

Change installation info logic

Update mocked state for snap

Add tests for ViewSnap component, refactor and update mocked state

Add check for version info

Change Snaps icon in Settings

Refactor Snaps list to use selector

Add handling in case of missing version history

* Fix icon ref

* Remove console logs

* Remove onClick from selector

* Add code fencing for imports in selectors.js
2023-04-24 12:21:37 +02:00
Om Raval
1452a5a8ce
Part of #17670: Replace Typography with Text component (#18569)
Co-authored-by: Om Raval <omraval@Oms-MacBook-Air.local>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2023-04-24 14:51:40 +05:30
Ananyamadhu08
b53d335b2c
Part of 17670: Replace Typography with Text in detected-token-address.js (#18435)
* feat: replaced typography with text comp

* fix: changed h7 to h6

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-24 14:49:35 +05:30
sumit shinde ( Roni )
db4c4317dd
Update knobs to controls in storybook: SelectQuotePopover (#18671)
* Update knobs to controls in storybook: SelectQuotePopover

* Update select-quote-popover.stories.js

* Update select-quote-popover.stories.js

* fix eslint

* Update ui/pages/swaps/select-quote-popover/select-quote-popover.stories.js

Co-authored-by: George Marshall <georgewrmarshall@gmail.com>

---------

Co-authored-by: George Marshall <georgewrmarshall@gmail.com>
Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-04-24 14:48:14 +05:30
Ariella Vu
8bfcd5b11e
Sign-in With Ethereum SIWE cleanup (#18230)
* signature-req: replace Typography w/ Text
- this does update styles slightly

* siwe: extract showSecurityProviderBanner

* siwe: rn -> hasAgreedToDomainWarning

* siwe: update snapshot for updated Text usage
2023-04-21 16:36:27 -03:00
Hassan Malik
f833f0e5aa
update ethereum provider endowment weight level and update install warning copy (#18732) 2023-04-21 15:34:11 -04:00
Albert Olivé
4f64e3d6c3
[MMI] Add-compliance-details component (#18575)
Co-authored-by: Antonio Regadas <antonio.regadas@consensys.net>
Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com>
2023-04-21 13:28:26 -05:00
George Marshall
d2779c9ef1
Updating Avatar components to forward refs (#18678)
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2023-04-21 08:51:34 -07:00
Nidhi Kumari
0efd00b755
UX Multichain: Added product tour component (#18571)
* adding product tour component

* updated control for prevIcon

* updated app-header and product tour

* updated css

* updated message strings

* updated tests

* removed console statement

* added selector for product tour

* updated test

* updated test

* updated state with steps

* Update ui/components/multichain/product-tour-popover/product-tour-popover.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

* Update ui/components/multichain/product-tour-popover/product-tour-popover.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

* Update ui/components/multichain/product-tour-popover/product-tour-popover.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

* Update ui/components/multichain/product-tour-popover/product-tour-popover.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

* Update ui/components/multichain/product-tour-popover/product-tour-popover.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

* Update ui/components/multichain/product-tour-popover/product-tour-popover.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

* Update ui/components/multichain/product-tour-popover/product-tour-popover.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

* Update ui/components/multichain/product-tour-popover/product-tour-popover.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

* Update ui/components/multichain/product-tour-popover/product-tour-popover.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

* Update ui/components/multichain/product-tour-popover/product-tour-popover.scss

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

* fixed lint errors

* updated lint error

* added changes for rtl support

* added changes for rtl support

* fixed lint errors

* Some suggestions (#18676)

* updated messages and indentation

* fixed popup close on my final step

* updated rtl classname condition

---------

Co-authored-by: Garrett Bear <gwhisten@gmail.com>
Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-04-21 20:58:18 +05:30
Mark Stacey
b467fbc07b
Update outdated browser versions (#18721)
The range of browsers considered to be outdated has been updated to
match our latest browser support policy, which is ~2 years on Chrome,
and the most recent end-of-life extended support release on Firefox.

Comments have been added to help explain how these versions were chosen
as well.
2023-04-21 12:03:46 -02:30
Albert Olivé
48a61610af
[MMI] Add transaction-failed functional component (#18623)
* Finished component

* Fixed test mock variable

* Using design system colors

* Using design system icons

* removed uneeded css
2023-04-21 15:53:02 +02:00
David Walsh
4e3c08aba4
UX: Multichain: Network Menu: Set Focus on Selected Network (#18706) 2023-04-21 08:37:51 -05:00
António Regadas
4f4e9fb29c
[MMI] update eth overview component (#18625)
* wip

* adds mmi stake button and portfolio

* removes unnecessary js icon

* prettier
2023-04-21 12:16:09 +01:00
António Regadas
16d8fc2908
[MMI] adds institutional duck to mmi folder (#18578)
* wip

* updates the duck

* adds test

* update duck

* run lint

* review changes

* clean up

* clean up

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-21 09:59:25 +01:00
António Regadas
290353da9b
[MMI] interactive replacement token notification (#18620)
* adds the component and styles

* adds tests

* story file update

* clean up

* lint and prettier

* lint & prettier fix

* adds review changes

* adds necessary dependencies

* runs lint and prettier
2023-04-21 09:58:03 +01:00
flexa-rob
3c01011ffe
17873 ledger instruction banner (#17937)
* switched to use banner alert and added story

* enabled dismiss functionality

* remove close button

* bump global branches coverage target

* replace Typography with Text and (link) Button with ButtonLink

* unit test for component rendering

* left-align button links to match text

* update copy to reflect figma mock ups

* update unit test snapshot

* bump coverage threshold

* update snapshot to reflect button component changes

* update snapshot to reflect box changes
2023-04-21 13:21:31 +10:00
micaelae
a144b75fe8
Show Bridge button in TokenOverview component (#18630)
* Show Bridge button in TokenOverview component

* Hide Swap button in token overview page when network is not supported
2023-04-20 23:57:18 -02:30
Thomas Huang
7d080dd1aa
Confirm recovery phrase onboarding unit test (#18250)
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2023-04-20 18:25:14 -07:00
Thomas Huang
b14b6ba07d
Recovery phrase chips onboarding unit tests (#18249)
* Recovery phrase chips onboarding unit tests

* Add Snapshot for recovery phrase chips

* Add test for classname hidden check and confirm recovery phrase indices

---------

Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2023-04-20 13:34:58 -05:00
Thomas Huang
33dd7ba976
Onboarding flow switch unit test (#18251)
* Onboarding flow switch unit test

* Fix typo welcom -> welcome
2023-04-20 13:34:24 -05:00
Thomas Huang
8d29fc907d
Create Password onboarding unit test, test-ids, and snapshot (#18257)
* Create Password onboarding unit test, test-ids, and snapshot

* Add button inline snapshot check for import wallet text

* Don't adjust inlineSnapshot formatting

* Get text content

---------

Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2023-04-20 13:33:50 -05:00
Thomas Huang
b91043cf72
Review Recovery Phrase onboarding unit test (#18301)
* Review Recovery Phrase onboarding unit test

* Add test for isFromReminderParam url navigation

* Lint
2023-04-20 13:33:25 -05:00
Thomas Huang
f9f628690c
Metametrics onboarding unit test, snapshot (#18253)
* Metametrics onboarding unit test, snapshot

* Test route navigation in metametrics
2023-04-20 13:12:37 -05:00
George Marshall
c38cd21629
Adding deprecation notice to javascript version of Icon (#18680)
* Adding deprecation notice to javascript version of Icon

* Fixing lint issue
2023-04-20 11:09:55 -07:00
Thomas Huang
fa02f32e1b
Creation successful test improvements (#18256) 2023-04-20 12:51:51 -05:00
Mark Stacey
3776f4ad4c
Remove mobile sync feature (#18692)
The mobile sync feature has been removed. It has been disabled for
years. When we enable sync again, it will be using a different
implementation. This has already been removed on the mobile side.
2023-04-20 14:29:30 -02:30
Thomas Huang
928bd1c5bb
Import srp onboarding unit tests (#18255) 2023-04-20 09:06:36 -07:00
Thomas Huang
735076b584
Add Network Modal onboarding tests (#18258) 2023-04-20 07:00:27 -07:00
Thomas Huang
9b724d1032
Create New Vault test improvements (#18259)
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2023-04-20 06:36:03 -07:00
George Marshall
e96c0b6963
Update to component-library readme (#18501)
* Update to component-library readme

* Update ui/components/component-library/README.md

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-19 19:30:29 -07:00
Monte Lai
fa6e26744d
18566 firefox ledger u2f message (#18570)
* check for user agent

* fix regex

* fix lint

* update link

* add test

* update message

* update coverage

* fix test names

* update text

* add whats new notification for firefox and ledger users

* update action button link

* update notification text

* update viewed notification

* update coverage

* update coverage
2023-04-19 19:23:07 -02:30
Garrett Bear
34c1e5a2a1
Fix/18492/update icon ts app folder (#18645) 2023-04-19 14:16:49 -07:00
Guillaume Roux
21e07ae6ba
use history.replace() instead of history.push() (#18663) 2023-04-19 20:38:27 +02:00
Garrett Bear
4e1a96b4ef
Feat/18308/ds popover header component (#18489)
* add popover component

popperjs init

popperjs hook init

popper arrow styles

fix popover story

add popover positions constant

story testing

popover structure

popper placement

make forwardref

fix popover with TS updates

modifiers

createPortal

add useClickAway hook

newer popover component build

simplifed popperjs with toggle to show/hide

toggle popover

modal version

popover progress 65%

add hover functionality

hide folder

storybook demo

add close button props

working popover with arrow

title prop breaking

popover TS conversion

TS updates

update test

add test

add arrow test

add stories

remove unused hook

fix docs

add popoverheader

types fix

Fix typo: detetcted-tokens-link -> detected-tokens-link (#18408)

Typography to text (#18382)

* Typography to text

* Update README.md

* Update README.md

* minor changes in custom file

* minor change

* Resolved Conflict issues

---------

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>

fix: Pass correct optimism chain id to gas estimation (#18478)

removes unnecessary images (#18484)

Fix firsttimeloaded logic (#18344)

* use session storage, instead of chrome.runtime.onStartup and globalThis, for firstTimeLoaded architecture

* Ensure account tracker accounts remain defined upon service worker restart

* lint fix

* Simplify code

* Only call browser.storage.session in mv3

* Only call browser.storage.session.set after resetStates in mv3

* fix metamask controller reset states unit tests

* fix test

* fix test

* Actually fix tests

* lint fix

[FLASK] More Snaps E2E Optimization and Delay Reductions (#18245)

* bip32 delay reduction

* asserts changed to waitFors in 32/44

* scrollTo change

* replaced delay for firefox flake

* more reduced delays

* more delay reductions and changes

* raise paralellism to 4 for snaps tests

* additional delay changes

* fixed update code

* removed comment

* removed another comment

Fix switch-ethereum-chain handler by passing configuration id to setA… (#18483)

* Fix switch-ethereum-chain handler by passing configuration id to setActiveNetwork

* fix e2e test

* Fix e2e tests

* Update test/e2e/tests/switch-custom-network.spec.js

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>

* Revert "Update test/e2e/tests/switch-custom-network.spec.js"

This reverts commit be533ff7f25e1fd42e951d9b817b8438035ae256.

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>

Bumping notification id's to 18 & 19 (#18460)

* Popover header update with TS ButtonIcon

* update PopoverHeader types

* update using new Text enums

* readme fix

* direct file import

* remove forwardRef and add action argtypes

* remove console.logs

* add arg types and fix TS on HeaderBase

* george nits

* popover header snapshot update

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-19 10:36:01 -07:00
Danica Shen
1e5f481a51
fix(18574): fix new BigNumber() not a number: undefined for setApprovalForAll method (#18660) 2023-04-19 19:20:18 +02:00
Nidhi Kumari
cb6223b75f
removed portfolio icon from eth overview (#18662) 2023-04-19 22:22:53 +05:30
Nidhi Kumari
d362dbfacb
UX Multichain: updated ethereum logo icon (#18528)
* updated ethereum logo icon

* Updating eth logo (#18631)

* Updating eth logo

* Removing border from eth logo identicon

* Removing old eth logo

* updated snapshot and lint errors

* updated eth logo from svg to png

---------

Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-04-19 20:55:19 +05:30
sumit shinde ( Roni )
52e91058a0
knob to control (#18635)
* knob to control

* Update confirm-add-suggested-token.stories.js

* fix eslint

* Update ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.stories.js

Co-authored-by: George Marshall <georgewrmarshall@gmail.com>

* Update ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.stories.js

Co-authored-by: George Marshall <georgewrmarshall@gmail.com>

* Update ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.stories.js

Co-authored-by: George Marshall <georgewrmarshall@gmail.com>

* Update ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.stories.js

Co-authored-by: George Marshall <georgewrmarshall@gmail.com>

* Update confirm-add-suggested-token.stories.js

* updaes

* Updating to use redux provider

* lint fix

---------

Co-authored-by: George Marshall <georgewrmarshall@gmail.com>
Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2023-04-19 14:33:29 +05:30
Jyoti Puri
5892acab81
Update gas limit on token allowance change (#18524)
* Update gas limit on token allowance change

* Fix unit test case

* lint: remove unused var txParams

* fix

* fix

* fix e2e

* fix e2e

* fix e2e

* fix e2e

* fix e2e

* fix build

* fix build

* fix build

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: legobt <6wbvkn0j@anonaddy.me>
2023-04-18 20:53:45 -02:30
Dan J Miller
39f6042e65
Ledger trezor display (#18637)
* gst

* Only display ledger info on approval screen for ledger hardware wallets
2023-04-18 17:19:49 -02:30
Garrett Bear
13f4295287
update Icon to TS version in UI Folder (#18551)
* update Icon to TS version and using proper Enums

* Update ui/components/ui/menu/menu.stories.js

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>

* Update ui/components/ui/nickname-popover/nickname-popover.component.js

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>

---------

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-04-18 09:48:34 -07:00
Jyoti Puri
c6aa4f38c5
Fix approve all warning modal (#18613)
* Fix approve all warning modal

* fix

* fix

* fix
2023-04-18 13:22:16 -02:30
Niranjana Binoy
9d3cdd1b79
Overriding gas estimate in the send page even if enough ETH is not available (#18554) 2023-04-18 11:10:32 -04:00
Danica Shen
66767d981c
fix/18577: Add title back for approving ERC20 token (#18617)
* fix/18577: Add title back for approving ERC20 token

* Apply suggestions from code review

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>

---------

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-04-18 15:49:31 +02:00
Guillaume Roux
76d79d9cce
[FLASK] Redesign dropdown-tab (#18546) 2023-04-18 12:46:38 +02:00
Jyoti Puri
09d00e1e45
Refactor confirm-send-ether into functional component (#18527) 2023-04-18 05:59:06 +05:30
Garrett Bear
81393e1b5d
update to enum DS Text component (#18584)
* update to enum DS Text component

* Update ui/components/component-library/text/README.mdx

Co-authored-by: Danica Shen <zhaodanica@gmail.com>

* Update ui/components/component-library/text/README.mdx

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>

* Update ui/components/component-library/text/README.mdx

Co-authored-by: Danica Shen <zhaodanica@gmail.com>

* Update ui/components/component-library/text/README.mdx

Co-authored-by: Danica Shen <zhaodanica@gmail.com>

* Update ui/components/component-library/text/README.mdx

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: Danica Shen <zhaodanica@gmail.com>
Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-04-17 10:17:28 -07:00
Albert Olivé
c3cb464229
[MMI] Added custody-labels and account-list components (#18197)
* Added custody-labels and account-list components

* Modified link

* Renamed custody labels and improved code

* Added snapshot

* Fixed snapshot

* Finished connect-custody account-list

* Fixing css prettier

* Fixed comments of the PR

* Fixed code

---------

Co-authored-by: António Regadas <apregadas@gmail.com>
2023-04-17 17:06:41 +02:00
Niranjana Binoy
fedd6d4970
New reusable gas-display component (#17976) 2023-04-17 10:34:26 -04:00
dswilson4
ca10a1cdb6
updated onClick of close button to call the same autohide fxn as the NFT import removal (#18504)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-17 16:13:00 +02:00
Frederik Bolding
47f4f4008b
[FLASK] Remove unused snaps code (#18565)
* Remove unused code after snap_confirm was removed

* Remove more unused code

* Fix lint
2023-04-17 12:55:08 +02:00
António Regadas
b50b9be502
[MMI] moves mmi selectors to institutional folder (#18542)
* adds the initial selectors

* adds more selectors

* adds tests

* fix lint and prettier
2023-04-17 09:22:53 +01:00
Ariella Vu
1406885115
siwe: add ledger instructions (#18589) 2023-04-14 21:10:27 -03:00
vthomas13
40e4a3653f
Updating Terms of Use, Adding popover and onboarding flow check (#18221)
* WIP commit

* Moving copy out of messages.json, styling changes

* handling scroll button click and disable logic

* moving scrollButton up to popover component, adding logic for accepting terms of use in popover and onboarding flows

* adding terms of use to e2e wallet creation/import

* adjusting failing unit test

* fixing QR code e2e

* updating welcome test

* setting app state in fixtures

* Update app/scripts/controllers/app-state.js

removing console log

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>

* Update ui/components/app/terms-of-use-popup/terms-of-use-popup.stories.js

adding args to ToU popup storybook

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>

* Update ui/components/app/terms-of-use-popup/terms-of-use-popup.js

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>

* updating DS components in terms of use

* popover styling changes

* adding metametrics tracking

* editing scrollbutton behavior

* adding unit test

* code fencing

---------

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-04-14 12:51:13 -04:00
António Regadas
8fdbd07c91
[MMI] Interactive replacement token modal (#18523)
* updates styles for confirm-add-institutional-feature

* initial component

* adds tests and storybook file

* clean up styles and adds MM design system

* prettier

* locale update

* lint

* snapshot update

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-14 11:35:58 +01:00
David Drazic
3eefe874a8
[FLASK] Revert changes made to stable permission display (UI design) (#18470)
* Revert changes made to stable permission display (UI design)

* Add test for new component

* Update paddings for install flow

* Fix missing icons on snap installation flow

* Update storybook path

* Add targetSubjectMetadata param

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
2023-04-14 12:04:23 +02:00
Garrett Bear
e09028b4e5
Update multichain Icon imports (#18536)
* Update multichain Icon imports

* replace ButtonIcon with updated version

* Buttons with Icon TODO added

* update header to use TS version Icon
2023-04-13 15:24:47 -07:00
Nidhi Kumari
8becb57d9e
updated copy Address (#18557)
Co-authored-by: Danica Shen <zhaodanica@gmail.com>
2023-04-13 23:07:33 +05:30
Jyoti Puri
a2bec15c68
Improvement on approval pages (#18545) 2023-04-13 22:54:33 +05:30
David Walsh
eb51460cae
UX: Multichain: App header (#18363)
* UX: Multichain: App header

* Export app header, provide required information, put feature flag in place

* Provide available data

* Implement account picker -- centered and opens account popover

* Remove backgrounds, use isUnlocked

* Fix placement of the global menu

* Show logo when unlocked

* Add selector for getting current network, provide props to AvatarNetwork and PickerNetwork

* Wire up the network menu to the header

* fixed ui for all the screens

* updated story for header

* fixed import and header settings

* updated lint error

* fixed tests

* updated header

* removed test

* updated snapshot test

* updated network menu

* updated changes

* removed comment from menu bar

* updated css

* updated test for network list menu

* updated stylesheet

* updated ButtonIcon import

---------

Co-authored-by: NidhiKJha <menidhikjha@gmail.com>
2023-04-13 22:24:03 +05:30
Niranjana Binoy
643a89f24d
Disabling network and account changes after the send flow is initiated (#18086) 2023-04-13 12:51:20 -04:00
António Regadas
300bfd6e69
[MMI] 2642 compliance modal component (#18410)
* adds component, styles and storybook file

* wip

* prettier and adds test

* prettier

* lint

* review fix

* lint

* updates to IconSize, IconName
2023-04-13 11:14:44 +01:00
Bernardo Garces Chapero
6ed72d6934
Refactor eth_getEncryptionPublicKey handling (#18319)
* add EncryptionPublicKeyController

* update message-managers package
2023-04-13 09:24:59 +01:00
Garrett Bear
065c499753
update ButtonIcon to TS (#18448)
* update ButtonIcon to TS

lint updates

fix lint issues

add ref

fix as prop

test updates

* box and icon updates for support

* Update ui/components/component-library/text-field/README.mdx

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

* fix disabled

* update types for as

* update readme

* fix storybook

* george changes to button icon

* revert headerbase

* box prop back to HTMLElementTagNameMap

---------

Co-authored-by: George Marshall <george.marshall@consensys.net>
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-12 08:55:24 -07:00
Matthew Walsh
bb0dff9443
Trigger transaction popup using ApprovalController (#18400) 2023-04-11 14:18:43 +01:00
Filip Sekulic
54aeb1b791
Replace contract with third party within the token allowance flow (#18101) 2023-04-11 08:49:42 +05:30
Amer Kadic
463fe40fde
Fix Unable to determine contract standard error (#18300)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-10 21:56:02 -03:00
dswilson4
826ac55c32
initial changes to support controls over knobs in storybook (#18502)
* initial changes to support controls over knobs in storybook

* fix linting issue
2023-04-10 13:37:07 +05:30
George Marshall
f31596af24
Fix hold to reveal button (#18496) 2023-04-10 11:27:56 +05:30
dswilson4
d4e12e55e8
Part of 17670: Replace Typography with Text swap-import-token (#18479)
* Initial changes to support Text component in import token component

* linting issue fix

* fix prettier linting issue

* updated styles and attributes for boxProps

* lint leading 0
2023-04-07 08:48:30 -07:00
Nidhi Kumari
b452f40e2f
Update new send icon (#18411)
* updated send icon

* optimised svg

* updated enum
2023-04-06 17:43:15 -07:00
vthomas13
c6cd3c9ff2
Bumping notification id's to 18 & 19 (#18460)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: Dan J Miller <danjm.com@gmail.com>
2023-04-06 12:38:11 -02:30
Danica Shen
f92e463a0f
fix: Pass correct optimism chain id to gas estimation (#18478) 2023-04-06 12:50:52 +01:00
Aditya Patel
18ff108627
Typography to text (#18382)
* Typography to text

* Update README.md

* Update README.md

* minor changes in custom file

* minor change

* Resolved Conflict issues

---------

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-04-06 16:40:14 +05:30
legobeat
a816a6e592
Fix typo: detetcted-tokens-link -> detected-tokens-link (#18408) 2023-04-06 18:31:45 +09:00
George Marshall
4ce605f514
Updating icon imports to TS version in component-library folder (#18449) 2023-04-05 09:11:10 -07:00
George Marshall
94292fadc9
Small update to badgewrapper story (#18450) 2023-04-05 08:37:09 -07:00
Frederik Bolding
40628da3b4
[FLASK] Fix crash when requesting unknown snap permission (#18447) 2023-04-05 15:34:33 +02:00
Albert Olivé
c52d2131d3
[MMI] Confirm-add-institutional-feature page (#18321)
* Added confirm add institutional feature page

* Finished implementing component

* Added all institutional ducks

* Fixed tests

* Removed ducks and console log

* Fixed snapshots

* Fixed messages json

* Changed method name and using useEffect

* Replace useEffect hook with a simple if statement to check if connectRequest exists and add null return statement to avoid warnings

* Remove unneeded dependency

* Added back useEffect and added a extra check to return null if connectRequest is false

* Fixed eslint problem

* Fixed all issues commented in the pr
2023-04-05 09:50:30 +01:00
Thomas Huang
3a38140cb6
Onboarding app header onboarding unit test and snapshot (#18254) 2023-04-04 19:59:09 -07:00
George Marshall
739075662c
Migrating Icon to typescript and deprecating JS component (#18431)
* Migrating Icon to typescript and deprecating JS component

* gw suggestions (#18434)

---------

Co-authored-by: Garrett Bear <gwhisten@gmail.com>
2023-04-04 09:48:04 -07:00
Mark Stacey
2029fb28ff
Fix MMI build (#18415)
In the MMI build, the build fencing in this component resulted in an
`else` block with no preceding `if` block, which is a syntax error.
The fence in this case was meant to include "all non-Flask build
types", MMI was mistakenly missing from that list.

Co-authored-by: Brad Decker <bhdecker84@gmail.com>
Co-authored-by: António Regadas <apregadas@gmail.com>
2023-04-04 10:29:10 -02:30
Nidhi Kumari
4b271868cf
Disabled button for Import Tokens Modal when no token is selected (#18396)
* disabled button for zero token

* addressed changes
2023-04-04 11:23:05 +05:30
Nidhi Kumari
0614b3db68
UXMultichain: update segmented tabs (#18283)
* update tabs to functional component

* updated Tabs to use Box

* updated css for tab

* updated css on home screen

* updated snapshot

* fixed defaultkey and active key value for new keys
2023-04-03 23:27:14 +05:30
Garrett Bear
01057f9824
convert text component to TS (#18329)
* convert text component to TS

* invisible character fix

* storybook fix

* fix types export

* update ButtonBase

* add typeof to objects in TextProps

* fix linting issues

* fix implicit conversion

* lint fix

* add deprecated Text back

* change box ref to any

* fix classnames issue

* account details to use deprecated text reference

* ref update

* make RefObject

* remove RefObject and go back to Ref

* react.ref change to box
2023-04-03 10:42:37 -07:00
David Drazic
8603a4b067
[FLASK] Add permission cell component (#18372)
* Add permission cell component

Add storybook and handling for revoked permission colors

* Fix things after conflict resolve after rebase

* Add code refactoring and minor UI changes

* Add permission cell component to snap-update flow

* Update storybook

* Add unit tests for permission cell

* Update component padding

* Fix spacing between permission cells

* Fix main icon color for approved permissions

* Update width value with constant
2023-04-03 19:33:54 +02:00
Guillaume Roux
f51055802f
[FLASK] Update snap delineator (#18385) 2023-04-03 18:04:30 +02:00
Elliot Winkler
1304ec7af5
Convert shared/constants/metametrics to TS (#18353)
We want to convert NetworkController to TypeScript in order to be able
to compare differences in the controller between in this repo and the
core repo. To do this, however, we need to convert the dependencies of
the controller to TypeScript.

As a part of this effort, this commit converts
`shared/constants/metametrics` to TypeScript. Note that simple objects
have been largely replaced with enums. There are some cases where I even
split up some of these objects into multiple enums.

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2023-04-03 09:31:04 -06:00
David Walsh
a71a06965c
UX: Multichain: Network Menu (#18229) 2023-03-31 12:58:25 -05:00
Nidhi Kumari
0bbfd38cc6
UX Multichain: Menu for Site connections and permissions (#18167)
* added site connection menu component

* reverted change for unlock page

* updated snapshot

* updated state with useSelector

* updated state for connected

* updated icons

* updated test

* updated snapshot

* moved component to multichain folder

* updated color

* added multichain connection to menu bar

* updated default color

* updated css

* updated multichain site with connected site info

* updated ui for not connected state

* removed scripts

* updated lint errors

* updated lint errors

* updated stories

* updated story for not connected to current state

* updated story for not connected to current state

* updated badge to 16px

* updated badge position

* updated snapshot

* fixed lint errors

* updated not connected state icon

* updated constants for status and added new locale string
2023-03-31 22:53:27 +05:30
David Walsh
74b9ab28f3
UX: Multichain: Close account menu when item is clicked (#18393) 2023-03-31 10:41:51 -05:00
Dan J Miller
41210084dd
Allow specific origin to direct to second page of token allowance flow (#18395)
* Allow specific origin to direct to second page of token allowance flow

* Remove accidentally committed git diff text

---------

Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
2023-03-31 11:34:55 -02:30
Pedro Figueiredo
fbd68d4a3f
Introduce action metrics for mv3 service worker restart (#18346)
* fix dapp interaction e2e test

* wip

* add sentry post request mock

* fix console errors

* fix scripting console error and remove e2e test unnecessary check

* clean up

* remove e2e test

* stop skipping  test

* fixing build mv3 job

* fixing unit tests

* fixing unit tests

* fixing unit tests

* update coverages

* revert skip mv3 e2e test

* remove IN_TEST on the npm script

* remove console.log

* revert aria label changes

* revert aria label changes

* revert permission changes

* revert permission changes

* implement sw restart delay tracking

* fix rebase
2023-03-31 14:22:33 +01:00
Albert Olivé
c2618176f6
[MMI] Added code fencing in info tab component (#17910)
* Added code fencing in info tab component

* Fixed storybook urls

* Removed isBeta mmi code fencing
2023-03-31 13:23:11 +02:00
António Regadas
234fb4ac5d
[MMI] confirm-add-custodian-token component (#18261)
* adds component with locales and test

* adds feedback from review

* adds storeis file

* update snapshots

* prettier

* clean up stories file

* relocation

* review fixes

* Update ui/pages/institutional/confirm-add-custodian-token/confirm-add-custodian-token.js

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

* Update ui/pages/institutional/confirm-add-custodian-token/confirm-add-custodian-token.js

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

* Update ui/pages/institutional/confirm-add-custodian-token/confirm-add-custodian-token.js

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

* Button path remove

* Update ui/pages/institutional/confirm-add-custodian-token/confirm-add-custodian-token.js

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

* pulled

* stories file update location

---------

Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-03-31 11:30:10 +02:00
David Walsh
e895ff33f9
NFTs: Use Unknown Collection instead of first NFT name (#18388)
* NFTs: Use Unknown Collection instead of first NFT name

* Use localization in hook

* Get localization for previously owned

* Fix tests

---------

Co-authored-by: Dan Miller <danjm.com@gmail.com>
2023-03-31 06:41:07 -02:30
Thomas Huang
00e6471d90
IPFS unit test for onboarding privacy setting (#18252) 2023-03-30 19:27:36 -07:00
Elliot Winkler
ed3cc404f2
NetworkController: Split network into networkId and networkStatus (#17556)
The `network` store of the network controller crams two types of data
into one place. It roughly tracks whether we have enough information to
make requests to the network and whether the network is capable of
receiving requests, but it also stores the ID of the network (as
obtained via `net_version`).

Generally we shouldn't be using the network ID for anything, as it has
been completely replaced by chain ID, which all custom RPC endpoints
have been required to support for over a year now. However, as the
network ID is used in various places within the extension codebase,
removing it entirely would be a non-trivial effort. So, minimally, this
commit splits `network` into two stores: `networkId` and
`networkStatus`. But it also expands the concept of network status.

Previously, the network was in one of two states: "loading" and
"not-loading". But now it can be in one of four states:

- `available`: The network is able to receive and respond to requests.
- `unavailable`: The network is not able to receive and respond to
  requests for unknown reasons.
- `blocked`: The network is actively blocking requests based on the
  user's geolocation. (This is specific to Infura.)
- `unknown`: We don't know whether the network can receive and respond
  to requests, either because we haven't checked or we tried to check
  and were unsuccessful.

This commit also changes how the network status is determined —
specifically, how many requests are used to determine that status, when
they occur, and whether they are awaited. Previously, the network
controller would make 2 to 3 requests during the course of running
`lookupNetwork`.

* First, if it was an Infura network, it would make a request for
  `eth_blockNumber` to determine whether Infura was blocking requests or
  not, then emit an appropriate event. This operation was not awaited.
* Then, regardless of the network, it would fetch the network ID via
  `net_version`. This operation was awaited.
* Finally, regardless of the network, it would fetch the latest block
  via `eth_getBlockByNumber`, then use the result to determine whether
  the network supported EIP-1559. This operation was awaited.

Now:

* One fewer request is made, specifically `eth_blockNumber`, as we don't
  need to make an extra request to determine whether Infura is blocking
  requests; we can reuse `eth_getBlockByNumber`;
* All requests are awaited, which makes `lookupNetwork` run fully
  in-band instead of partially out-of-band; and
* Both requests for `net_version` and `eth_getBlockByNumber` are
  performed in parallel to make `lookupNetwork` run slightly faster.
2023-03-30 16:49:12 -06:00
Jyoti Puri
b3e45ea4bc
Adding terms of use link for opensea (#18381) 2023-03-30 22:25:02 +04:00
David Walsh
6f7e382777
UX: Multichain: Improve accessibility of accounts menu (#18309)
* UX: Multichain: Improve accessibility of accounts menu

* Use button instead of a

* Pass color instead of using CSS
2023-03-30 13:12:45 -05:00
David Walsh
ba307d7258
UX: Multichain: Account Picker (#18177)
* UX: Multichain: Account Picker

* Update ui/components/multichain/account-picker/index.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

* Update ui/components/multichain/account-picker/index.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

* Update ui/components/multichain/account-picker/index.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

* Update ui/components/multichain/account-picker/index.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

* Cleanup

* Move file names to DS standard

* Add index for export

* Add MULTICHAIN flag

* Fix hover color

* Fix lint

* Use BackgroundColor instead of Color

* Add comments for propTypes

* Provide args properly

* Implement onClick arg

* Fix alignment

* Update ui/components/multichain/account-picker/account-picker.js

* Update ui/components/multichain/account-picker/account-picker.js

* Update ui/components/multichain/account-picker/account-picker.js

* Update ui/components/multichain/account-picker/account-picker.js

* Update ui/components/multichain/account-picker/account-picker.js

* Only use account name and address, account for blockies or jazzicons

* Add test

* Fix jest change

* Fix CSS locations

* Update ui/components/multichain/account-picker/account-picker.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

* Update ui/components/multichain/account-picker/account-picker.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

* Update ui/components/multichain/account-picker/account-picker.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

* Update snapshot

* Update border radius

* Fix jest

* Switch to using Button

---------

Co-authored-by: Garrett Bear <gwhisten@gmail.com>
2023-03-30 13:11:13 -05:00
Pedro Figueiredo
05f0006684
Fix aria label error on the console (#18370)
* fix aria label bug

* improve solution

* improve solution

* improve solution

* update snapshot
2023-03-30 18:33:42 +01:00
Alex Donesky
da06901f79
Fix #18199 : Add fallbacks for confirmation title on NFT transfers (#18269)
* add fallbacks for confirmation title on nft transfers

* Add token name and id

* fix

* fix test

---------

Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2023-03-30 14:07:29 -02:30
António Regadas
9f89d71c6f
[MMI] compliance settings component (#18274)
* MMI-2657 adds the compliance settings screen

* MMI-2657 adds stories file

* review fixes

* review fixes

* lint fix

* clean up

* Update ui/components/institutional/compliance-settings/compliance-settings.stories.js

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>

* lint fix

* snaps update

* Button update

---------

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-03-30 12:40:37 +02:00
Albert Olivé
b5184db620
[MMI] Added code fencing in keyring-label component (#17993)
* Added code fencing in keyring-label component

* Updated tests
2023-03-30 09:42:59 +02:00
Albert Olivé
f7aea9dc34
[MMI] Created institutional-entity-done-page component (#18096)
* Created institutional-entity-done-page component

* Added index file

* Added css file and Boxes

* Fixing prettier formatter

* Fixed prettier format

* Fixing prettier issues

* Fixed prettier

* Adding Text component

* Removed styles and added story

* Moving component to pages and improving styles

---------

Co-authored-by: António Regadas <apregadas@gmail.com>
2023-03-30 08:33:12 +02:00
Hassan Malik
c2b2f2685e
[FLASK] Redesign key management modal (#18263)
* added the rest of the sev1 warnings to getSnapInstallWarnings

* added and updated translations

* Updated getSnapInstallWarnings to include warnings for all weight-1 permissions

* Updated snap install warning and css according to designs

* fix snaps tests

* fixed alignment/spacing

* updated e2e tests to click through the newly displayed public key access warning

* lint fix

* fixed update snap test

* refactored getSnapInstallWarnings, moved logic to PERMISSION_DESCRIPTIONS

* fix logic to account for objects & arrays

* update function description

* add missing properties to ethereum provider description

* moved id and message to baseDescription to fix error

* add optional chaining to fix undefined error

* more optional chaining

* more optional chaining
2023-03-29 15:17:57 -04:00
David Walsh
6052841381
Fix breaking jest test for MMI (#18365)
* Fix breaking jest test for MMI

* Bump coverage threshold

---------

Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
Co-authored-by: PeterYinusa <peter.yinusa@consensys.net>
2023-03-29 13:44:04 -04:00
David Walsh
efc34b9420
UX: Multichain: Address Copy Button (#18153) 2023-03-29 11:14:38 -05:00
António Regadas
8fbd1e30e8
[MMI] compliance feature page (#18320)
* MMI-2657 adds the compliance settings screen

* MMI-2657 adds stories file

* wip compliance feature page

* adds stories and fixes imports

* adds storybook and tests

* lint fix
2023-03-29 14:49:45 +01:00
OGPoyraz
f32d71ba1a
Merge pull request #18102 from MetaMask/fix/599-fix-theme-issues-of-desktop-pairing-page-in-the-extension-ui
fix: fix theme issues of desktop pairing page
2023-03-29 10:58:17 +02:00
Thomas Huang
8f65c268b4
Welcome onboarding unit test (#18248) 2023-03-29 14:00:34 +08:00
Youmna Jaza
6be18552ab
Updating Typography to Text (#17681)
Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2023-03-28 15:04:22 -07:00
David Walsh
870415f111
UX: Multichain: Global Action Menu (#18158) 2023-03-28 14:59:18 -05:00
David Walsh
8cba64b993
Remove isEIP1559Account usage (#18064) 2023-03-28 09:50:02 -05:00
Goktug Poyraz
c640e769b2 Update snapshot 2023-03-28 10:36:53 +02:00
Goktug Poyraz
3a1bcf1446 Adds desktop pairing page story and fix suggestions 2023-03-28 10:35:30 +02:00
Goktug Poyraz
c1b607bdba Fix: add tests 2023-03-28 10:35:30 +02:00
“Goktug
d2098e26ac fix: fix theme issues of desktop pairing page 2023-03-28 10:35:30 +02:00
aleksandar-mihajlovic
0f1b86a037
Removed advanced gas controls from the settings (#18138) 2023-03-27 08:45:17 +02:00
Frederik Bolding
4179ce634c
[FLASK] Update snap authorship component (#18262)
* Create new snap authorship component

* Add icons and fix overflow issues

* Add empty state + more fixes

* Fix overflow

* Move some code to SnapAvatar

* Fix lint

* Change component name

* Delete forgotten file
2023-03-24 17:16:46 +01:00
Garrett Bear
79b2deb194
update text component color to use box color (#18246)
snapshot updates

fix snapshots

add background colors

fix snapshots
2023-03-23 13:00:37 -07:00
Ariella Vu
0d2c54e808
Fix Signature Request scroll (#18305)
* signature-req: fix scroll

* signature-req: fix scroll allow items to shrink
2023-03-23 16:04:24 -03:00
Jyoti Puri
5dee7904d6
Extracting out title component from confirm-transaction-base (#17991) 2023-03-23 22:21:33 +04:00
micaelae
2fc0d93789
Disable Bridge button on unsupported networks (#18268) 2023-03-23 14:54:10 -02:30
Ariella Vu
196b8408d0
PermissionsConnectHeader: unlock SiteOrigin title (#18270)
* PermissionsConnectHeader: unlock SiteOrigin title

* SignatureRequestOriginal: unlock SiteOrigin title

* signature-req: update snapshots
2023-03-23 13:32:54 -03:00
Dan J Miller
270ff26561
Fixes to the Linea Goerli implementation (#18290)
* Ensure that NonInfuraDefaultNetworks are only selected in the dropdown if they are the currently selected network

* Ensure Linea Goerli network appears in network settings tab if added manually
2023-03-23 13:37:28 -02:30
Garrett Bear
ed5b78d61b
Feat/add header base component (#18043)
* add header base component

* fix resizing issue

* add center

* add demo

* header base using flexbox

* fix button issue

* header base clean up

* update tests

* add readme description

* add docs

* update snapshot

* add more to readme

* convert to TS

* fix file name

* fix types and colors

* fix classname error

* fix boxprops import

* fix boxprops

* prop fix

* fix errors

* Update ui/components/component-library/header-base/header-base.stories.tsx

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

* Update ui/components/component-library/header-base/header-base.types.ts

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

* Update ui/components/component-library/header-base/header-base.types.ts

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

* headerbase fixes

* fix export

* remove Math.max

* change order for index on storybook to prep build

* revert back to order

* remove type from export

* add type to export

* change export of headerbase function

* export update

* revert back to normal

* add type to export

* Removing interface export from index

---------

Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-03-23 08:24:23 -07:00
George Marshall
99bdf8458c
Adding ModalOverlay component (#18161) 2023-03-23 06:36:09 -07:00
Ariella Vu
4474359591
Fix overflowing UI & buttons in Signature Request screens (#18247)
* signature-req: fix overflow ui

* signature-req: fix uneven btn height
2023-03-23 10:25:00 -02:30
aleksandar-mihajlovic
8c310a0a8b
Fix for hovering any Address parsed on Signed Type Data screen does not display the pointer anymore (#18046)
* Signed Type Data address hover fix

* Snapshots fix

* Snapshots update fix

* Update snapshot
2023-03-23 08:05:25 -02:30
Nidhi Kumari
fcfb8a8938
UX: Multichain: Added TokenList Component (#17859)
* added redesign storybook

* updated token list

* updated css

* fixed lint error

* updated the new token list component

* fixed redesign folder error

* reverted changes in settings.json

* updated redesign to multichain

* added feature flag

* reverted settings.json

* added detect token banner

* added button componeny

* fixed lint errors

* removed settings

* fixed lint errors

* added stories for multichain

* updated no token found string

* updated lint error

* updated padding values

* updated padding values

* updated tabs with role button

* updated hover state

* updated components with multichain

* fixed lint errors

* updated multichain import token link

* updated a tag

* updated fixes

* updated onClick to handleClick

* updated setShowDetectedTokens proptype

* updated multichain tokenlist with item suffix

* updated tests

* updated tests

* updated token list css

* updated snapshot

* updated text

* reverted story

* added story for multichain token list

* updated story

* updated tooltip

* updated the new token list component

* fixed redesign folder error

* added feature flag

* reverted unused setting change

* removed token list

* fixed lint error

* updated status

* updated tooltip

* updated token-list-item changes

* updated actionbutton click for detect token banner

* updated snapshot

* updated symbol

* updated styles

* updated eth decimal and token url

* updated snapshot

* updated scripts

* updated snapshots
2023-03-23 15:38:33 +05:30
George Marshall
68f928c8a2
Adding ModalContent component (#18175)
* Adding ModalContent component

* Using different component api for ref

* use imperative handle

* Updating size

* Updating stories and docs as well as component api

* Fixing import
2023-03-22 17:17:19 -07:00
vthomas13
16fa967740
Revert "What's new - OpenSea security provider (#16831)" (#17968)
This reverts commit 932282e638.
2023-03-22 12:51:37 -04:00
Nidhi Kumari
cedef121a3
updated keyringType (#18273) 2023-03-22 16:39:58 +05:30
David Walsh
c079c4320e
UX: Multichain: Account Menu List (#17947)
* UX: Multichain: Account Menu List

* Move to using stylesheet

* Add hover state

* Implement George's suggestions

* Add connected site avatar

* Add hardware tag

* Create story for selected hardware item

* Progress on the AccountListItemMenu

* Add story for AccountListItemMenu

* Better position the account menu

* Fix AvatarFavicon missing name prop

* Update menu options label to be account specific

* Update text of 'View on Explorer'

* Add AccountListMenu component

* Move all items to multichain directory

* Fix paths

* Fix linting, use AvatarIcon

* Add title and close button to account menu

* Center the popover title

* Add search functionality

* Implementation WIP

* Add MULTICHAIN feature flag

* Add MULTICHAIN feature flag, add actions for menu items

* Properly dispatch events

* Fix search box padding

* Fix sizing of menu item text

* Fix isRequired

* Fix alignment of the popover

* Update label for hardware wallet items, add text for no search results

* Update keyring retreival to remove account and add label

* Fix storybook

* Fix double link click issue, prevent wrapping of values

* Use labelProps for tag variant

* Restructure item menu story

* Empower storybooks for all new components

* Allow only 3 decimals for currencies

* Avoid inline styles

* Prefix classes with multichain, fix account-list-menu storybook

* Close the accounts menu when account details is clicked

* Restore tag.js

* Create global file for multichain css

* Add index file for multichain js

* Update file paths

* Ensure the block domain is present in menu

* Add AccountListItem test

* Add AccountListItemMenu tests

* Show account connect to current dapp

* Improve tests

* Make avatar smaller

* Add tooltip for account menu

* Align icon better

* Update snapshot

* Rename files to DS standard

* Add index files for export

* Export all multichain components

* Update snapshot

* Remove embedded style in popover

* Add comments for props, cleanup storybook

* Improve test coverage

* Improve test code quality

* Remove border form avatar

* Switch to using the ButtonLink iconName prop

* Only show tooltip if character limit is reached

* Restore prior search settings

* Add test for tooltip
2023-03-22 15:30:08 +05:30
David Walsh
7dab4b53a4
Fix TypographyVariant typescript issues (#18272) 2023-03-22 13:22:30 +05:30
Garrett Bear
de4cf0a7e5
Fix/button base ellipsis support (#18205)
* ButtonBase ellipsis update

Update ui/components/multichain/account-picker/index.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

Update ui/components/multichain/account-picker/index.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

Update ui/components/multichain/account-picker/index.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

Update ui/components/multichain/account-picker/index.js

Co-authored-by: Garrett Bear <gwhisten@gmail.com>

* buttonbase updates to fix ellipsis

* multichain support

* remove multichain

* code cleanup

* clean up

* component clean up

* span update

* fix snapshots

* fix snapshot

* Updating ButtonBase to reduce html to a minimum but ensure all functionality still works (#18210)

* fix color and disable

* remove unused css

* Update ui/components/component-library/button-base/README.mdx

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

* fix e2e test from button update

* update e2e test from button base update

---------

Co-authored-by: David Walsh <davidwalsh83@gmail.com>
Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-03-21 19:19:49 -07:00
Suryansh Anand
b9f00ba536
Changed all Typography to Text component in welcome.js and edit-gas-display.component.js (#18116)
Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-03-21 23:47:59 +05:30
Ariella Vu
5e3770eb13
Replace ActionableMessage components with BannerAlerts in SIWE Sign-in with Ethereum page (#18207)
* siwe: re-enable warning UI for mismatched domains
- unblocks mismatched domain support
- we may re-add error handling here #18184
- reverts logic from #16616

* siwe: fix mismatch domain warning msg UI

* lint: rm whitespace EOL

* siwe: rm unit test

* lint: fix whitespace

* Icon: support .mm-icon
- apply to SIWE actionable-message
- .mm-icon is a <span>

* lint: fix newline

* Revert "siwe: rm unit test"

This reverts commit c80a4a2e661609c46c76d1e43e05909b6db3f0f5.

* ActionableMessage: add deprecation

* siwe: replace actionable-msg w/ banner-alert

* ActionableMessage: add param for lint

* revert .mm_icon ActionableMessage support

* siwe: create tests

* siwe: fix typo in tests

* siwe: fix - do not allow nested <p> elements

* Update ui/components/app/signature-request-siwe/signature-request-siwe.js

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

* Update ui/components/app/signature-request-siwe/signature-request-siwe.js

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

* eslint fix

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-03-21 09:49:04 -07:00
Victorien Gauch
a04fa20f96
feat: add the ConsenSys zkEVM (Linea) as a default network (#17875)
* feat: add the consensys zkEVM as a default network

* fix: change infuraNetworkStatus in navigate-txs file

* fix: remove account tracker for zkEVM + remove zkEVM from infura list

* fix: change consensys zkevm name to linea + change rpc url for linea network

* fix: rebase conflicts

* feat: add new colors for linea goerli network

* feat: add new function inside network dropdown to render non infura networks

* feat: add feature toggle for linea network

* fix: add new unit test

---------

Co-authored-by: Dan J Miller <danjm.com@gmail.com>
2023-03-21 13:58:38 -02:30
David Drazic
0847917df4
[FLASK] Update UI related to MetaMask Snaps Platform trademark (#18172)
* Update UI related to MetaMask Snaps Platform trademark

* Remove redundant UI text according to new designs

* Fix lint errors

* Fix e2e test expectation

* Fix lint in test

* Fix e2e test expectation

* Fix some UI parts

* Update CSS for noSnaps message

* Add next design iteration

* Add minor fix

* Update locale message

* Fix learn more text size

* Refactor usage of design system components

---------

Co-authored-by: Erik Marks <rekmarks@protonmail.com>
2023-03-21 16:52:13 +01:00
Mark Stacey
d6b49ae383
Refactor KeyringTypes constant (#17490)
The `HardwareKeyringTypes` constant has been renamed to `KeyringTypes`
and moved to a separate constants module, to reflect that it contains
more than just hardware wallet keyring types. This corrects a mistake
made recently during a TypeScript conversion.
2023-03-21 12:13:22 -02:30
Vladimir Saric
1d5e8a7840
Added fallback copy for when we're not able to retrieve a erc721 or erc1155 name in the setApprovalForAll screen (#17992)
* Added fallback copy for when we're not able to retrieve a erc721 or erc1155 name in the setApprovalForAll screen and added unit tests

* Fixing lint

* Review requested changes

* Modify small copy changes in messages.json

* Fixing nft e2e tests

* Fixing nft e2e tests final

* Added snapshots for tests and removed data-testid

* Modify translation messages and e2e tests
2023-03-20 18:05:48 +01:00
Guillaume Roux
f8fd9cde71
[FLASK] Remove permission footer in snap install/update flow (#18240) 2023-03-20 17:12:58 +01:00
Albert Olivé
839d6a59ed
[MMI] Added mmi code fencing in onboarding flow (#17880)
* added mmi code fencing

* Fixed code fencing issue
2023-03-20 15:39:29 +01:00
Matthew Walsh
bf29922488
Use core message managers and create sign controller (#18163) 2023-03-20 13:19:50 +00:00
António Regadas
033b776c0e
[MMI] adds the jwt-url-form component (#18198)
* MMI adds the Jwt dropdown

* MMI prettier

* review fixes

* adds the component

* adds tests and story file

* lint & prettier fix

* prettier fix

* prettier and clean up

* prettier and clean up
2023-03-20 11:55:53 +00:00
Maarten Zuidhoorn
c59e2b4d44
[FLASK] Add tooltips to show info about a permission (#17685)
* Add tooltips to show info about a permission

* Make Tooltip component in scope regardless of build type

* Add descriptions

* Add translation variables and fix tooltip

* Use new icons

* Add missing description after rebase

* Fix build issues

* Fix icons

* Fix translation

* Add missing description

* Fix Ethereum icon

* Update coverage
2023-03-20 12:32:03 +01:00
Ariella Vu
c4caef5e12
Sign in with Ethereum: re-enable warning UI for mismatched domains / disable domain binding (#18200)
* siwe: re-enable warning UI for mismatched domains
- unblocks mismatched domain support
- we may re-add error handling here #18184
- reverts logic from #16616

* siwe: fix mismatch domain warning msg UI

* lint: rm whitespace EOL

* siwe: rm unit test

* lint: fix whitespace

* Revert "siwe: rm unit test"

This reverts commit c80a4a2e661609c46c76d1e43e05909b6db3f0f5.

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-03-17 10:36:20 -07:00
George Marshall
2a562087f9
Updating label according to insight report (#18151) 2023-03-17 10:24:07 -07:00
George Marshall
3117890b30
AvatarBase font-size logic (#18203)
* Updating AvatarBase to use Text component instead of Box and adding font size logic based on avatar size

* Updating snaps
2023-03-17 10:06:59 -07:00
Guillaume Roux
d6f58bceb0
[FLASK] snaps-monorepo@0.31.0 (#18142)
* allow SnapController to call `ApprovalController:updateRequestState` action

* combine popups

* show only autorship pill on result

* lint

* update `snaps-monorepo@0.31.0` and regen policies

* dedupe deps and fix fencing

* fix update button text

* fix fencing

* Update a bunch of e2es

* address requested changes

* update policy

* bump key-tree

* fix lint

* Update RPC E2E

* fix locales

* Remove wrong instance of window handle polling

* design changes and address pr comments

* remove unused imports

* fix lint

* fix fencing

* remove unused locales

* fence things

* re-add redirection

* bump test-snaps version

* Fix update e2e

* fix redirecting logic and address requested changes

* force update metamask state on approved

* move force update

---------

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
2023-03-17 12:00:05 +01:00
George Marshall
d7f7d9c706
Box types update (#18160) 2023-03-16 13:18:00 -07:00
António Regadas
0a376fe3ab
MMI adds the note-to-trader component (#18106)
* MMI adds the note-to-trader component

* MMI adds colors vars

* MMI added component folder

* MMI adds fireEvent

* adds Box

* review fixes

* adds story

* lint fix

* prettier fix

* prettier fix

---------

Co-authored-by: Albert Olivé <albertolivecorbella@gmail.com>
2023-03-16 11:26:00 +00:00
António Regadas
0b83b13b4a
MMI adds the Jwt dropdown component (#18117)
* MMI adds the Jwt dropdown

* MMI prettier

* review fixes

* MMI added stories file
2023-03-16 11:03:54 +00:00
Frederik Bolding
dce4c6d7c5
[FLASK] Fix overflow issues with text coming from snap UI (#18169) 2023-03-16 11:45:44 +01:00
Ayush
1c613a4556
Part of #17670: Replace Typography with Text component (#17959)
* Updated confirm-page-container-summary.component.js

* Updated snap-insight.js

* Updated confirmation-warning-modal.js

* Updated create-new-vault.js

* Fixing import errors, linting errors and adding a story

* Updating storybook path

* Updating snapshot

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2023-03-15 17:00:54 -07:00
Filip Sekulic
c477e29397
Fixed hardware wallet info popup on token allowance screen (#17881) 2023-03-14 12:29:31 -05:00
vthomas13
bfefa35811
Adding NFT autodetection to "What's New" Announcements (#17653)
* adding base what's new for NFT autodetection

* lintfix

* Adding nfts svg image

* adding new notification to fixture builder for e2e

* lint:fix

* Adding new messaging, styling what's new

* styling descriptions, increasing fullscreen height

* applying firstNotification styling to NFT whats new announcement

* adding scrollDown button to whats new popup

* adding Opensea announcement, removing old announcement, moving scrollDown button up to popover component

* verify-locales:fix

* updating icon
2023-03-14 11:07:58 -04:00
Thomas Huang
eafffb1af5
Remove console.log of expected action from actions test (#18130) 2023-03-14 06:09:16 -05:00
António Regadas
c022d2eb9a
[MMI] Move mmi actions to extension (#18057)
* MMI adds actions and background files to the institution/ folder

* MMI lint fix

* MMI lint fix

* MMI import path fixed to be relative

* MMI import path fixed

* MMI adds the relative path to isErrorWithMessage

* MMI adds the tests for mmi actions

* MMI lint fix

* adds tests to mmi actions

* prettier fix

* MMI prettier and adds test

* MMI prettier

* MMI lint fix

* MMI prettier fix

* MMI rename folder
2023-03-14 10:57:05 +00:00
David Walsh
ada47802b3
UX: Loaclize the avatar-favicon description text (#18132) 2023-03-14 12:18:27 +05:30
Ariella Vu
f499b56d16
Convert LoadingScreen into Functional Component and use React.memo (#17935)
* LoadingScreen: transform into functional component

* LoadingScreen: remove unnecessary styles

* LoadingScreen: mv renderMessage
2023-03-13 14:48:30 -07:00
David Walsh
5b1b5dc03b
NFTs: Remove feature flag for release (#17401)
* NFTs: Remove feature flag for release

* Update security tab jest test

* Fix broken test

* Update snapshot

* Update test

* Fix test

* Remove last usages of flag

* Update CI jobs

* Fix jest tests
2023-03-13 14:29:37 -05:00
flexa-rob
e7527b65ee
17921 Update TransactionAlerts with BannerAlert (#17940)
* use banner alerts

* update selector for banner alert content

* lintage

* update button click for banner alert structure

* bump global branches coverage target

* removed unnecessary Typography usage

* remove Typography usage

* transaction alerts story

* pending transaction alerts

* created separate stories for each alert scenario
2023-03-13 12:29:10 -07:00
Suryansh Anand
a2838b0dd1
Part of 17670: Replace Typography with Text confirm-approve-content.component.js and home.component.js (#18049)
* Changed Typography to Text component in comfirm-apporve-content-component.js

* Changed Typography to Text component in home.component.js

* Changed Typography to Text component in comfirm-apporve-content-component.js

* Changed Typography to Text component in home.component.js

* Changed all h7 heading to h6 as h7 does not exist

* Fixed prettier errors on home.component.js

* Alignment fix

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2023-03-13 12:27:24 -07:00
David Walsh
be15200168
UX: Icon: Update buy icon (#18123) 2023-03-13 14:14:43 -05:00
Vladimir Saric
14b1555ee3
Display internet protocol on the domain in SIWE screen (#18052) 2023-03-13 21:40:43 +04:00
micaelae
a69cb0284d
Wrap balance and portfolio button (#18109) 2023-03-13 10:50:12 -05:00
David Walsh
000dbb976c
Fix ThemeType casing issue (#18039) 2023-03-13 10:00:55 -05:00
George Marshall
5d5fa242c3
Updating AvatarAccount objects to enums (#17727)
* Updating object to enums

* lint fix

* Improving test coverage

* Updating filename to .types.ts
2023-03-10 12:12:55 -08:00
witmicko
fde18dec0c
link component (#17897)
Added externlalLink to ButtonLink

Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-03-10 17:47:01 +00:00
Dan J Miller
3ad6cf15ae
Use replace instead of replace all so that we are compatible with v78 (#18080)
* Use replace instead of replace all so that we are compatible with v78

* Add unit tests
2023-03-10 10:06:07 -03:30
David Drazic
642ce91b70
[FLASK] Add WebAssembly endowment (#17694)
* Add WebAssembly endowment

Update message and fix lint

Update fa icon

* Remove duplicated webassembly permission from a list
2023-03-10 12:38:58 +01:00
David Walsh
d6e61e9d07
Fix #17948 - Allow editing of NFT sends (#17970) 2023-03-09 15:02:08 -06:00
Alex Donesky
23ca4460cf
Migrate network configurations (previously frequentRpcListDetail) from PreferencesController to NetworkController (#17421) 2023-03-09 15:00:28 -06:00
David Walsh
423e0854d3
Fix #17848 - Ensure NFT collections toggle appropriately (#17972) 2023-03-09 12:10:37 -06:00
Thomas Huang
766c8a3e53
Force update mock state and render nfts item test fix (#18044) 2023-03-09 22:06:12 +05:30
Alex Donesky
1121e3a848
fix network dropdown bug (#18079) 2023-03-09 10:11:38 -06:00
Nidhi Kumari
bf06598d6e
UX Icon: Updated Icon for Disclosure (#17877)
* updated fa-add

* updated summary icon

* updated styles for disclosure

* updated margin value
2023-03-09 10:48:44 +05:30
Jyoti Puri
0ac54e40ee
Extract out confirm-data and confirm-hex-data components from confirm-transaction-base.component.js (#17822) 2023-03-09 10:38:37 +05:30
Garrett Bear
2c2505be06
add banner-tip component (#17814)
* add banner-tip component

* set fixed width

* add banner tip props to logo

* fix logo type naming

* update test

* reduce png sizes

* upate type name and add image element test

* updates

* Update ui/components/component-library/banner-tip/banner-tip.js

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

* update BannerTip

* fix text case banner tip

---------

Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-03-08 13:27:24 -08:00
George Marshall
ed519d8b60
Updating AvatarWithBage to BadgeWrapper (#17851) 2023-03-08 13:18:55 -08:00
David Walsh
de83546d6d
Fix #17932 - Ensure NFT last sold price is formatted correctly (#17983)
* Fix #17932 - Ensure NFT last sold price is formatted correctly

* Fix storybook

* Update snapshot to include pricing
2023-03-08 14:39:12 -06:00
Hassan Malik
7086494b72
[FLASK] BREAKING - snaps-monorepo@0.30.0 (#17718)
* updated snap permission to wallet_snap, updated tests and added migration

* updated snap packages

* yarn.lock fix

* fixed errors

* override policy

* update policy

* undo override

* updated localization message descriptions

* updated lavamoat policy

* more policy updates

* update permission controller version

* update policy

* update fixture builder

* updated code to include permission value to satisfy wallet_snap permission description call

* fix import issue

* update test-snaps version

* added missing actions, added snap permission dedupe function

* prettier fix

* fix fencing

* add more fencing

* prettier fix

* fix fencing (again)

* added new action and selector and updated view snap accordingly

* update test snaps website version

* unfence request variable

* add fencing

* add optional chaining to fix type error

* update migration #

* remove old migration

* prettier fix

* fix migration test

* fix fencing

* added missing fencing

* updated code to workaround fencing

* update test-snaps site version and remove snap confirm test

* update snap packages

* update policies

* fix merge marker issue

* update test

* more fixes

* fix permissions

* update test

* fixed test

* Bump test-snaps and iframe-execution-environment

* remove unused snap permission from fixture builder

* update policies

* undo comment removal, update selector implementation

* removed unnecessary function, updated migration, updated caveat action

* remove optional chaining

* fix type issue

* more type fixes

* fix migration test

* remove isFlask check, make migration logic more robust

* update coverage

* Update LavaMoat policies

* Update test/e2e/snaps/enums.js

* add extra bail condition

* Revert "add extra bail condition"

This reverts commit b45c53dcfc6e6e35a5e283d4955d6d6ea9ca5965.

* Revert "Revert "add extra bail condition""

This reverts commit cd2ded677935c9cdab0c02b6af55474c83727f60.

* fix test

* add SnapController entry to state object

* updated permission name and caveat type with hardcoded values

* add extra test for non-flask scenario

* update lavamoat policies

* fix locale messages

* change coverage target

* re-enable rpc snap test

* revert locale message change

* fix el message

* reverted changes

---------

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
2023-03-08 13:29:23 -05:00
Dan J Miller
efaaf4fab2
Use tokenList to get token details, when available, in getTokenStanda… (#17891)
* Use tokenList to get token details, when available, in getTokenStandardAndDetails

Previously, every call to getTokenStandardAndDetails would fetch data via the provider.
This would result in at least 3 network requests whenever that method is called for an
ERC20 token, contributing to unneccesary loading and lagging in multiple places.
This commit takes advantage of stored data we already have available to avoid the unnecessary
loading.

* Lint fix

* Fix build-quote test

* bump coverage targets

* Pass provider to token-util, for use in ethers Contract module

* Check all possible sources of ERC20 token data before async call to assetsContractController

* Add and update tests

* Update app/scripts/metamask-controller.js

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

* Update app/scripts/metamask-controller.js

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

* Remove unnecessary this.ethQuery changes

* Use metamask-eth-abis instead of human-standard-token-abi in token-util.ts

* Add explanatory comments to getTokenStandardAndDetails

* lint fix

* Cleanup

* fix test

* Update app/scripts/metamask-controller.js

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

* update error message

---------

Co-authored-by: Alex Donesky <adonesky@gmail.com>
2023-03-08 14:05:45 -03:30
George Marshall
848b699f68
Adding types file to Box component (#18009) 2023-03-08 09:35:16 -08:00
witmicko
75801e9502
delay chain validation (#17413) 2023-03-08 16:33:27 +00:00