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

851 Commits

Author SHA1 Message Date
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
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
vthomas13
16fa967740
Revert "What's new - OpenSea security provider (#16831)" (#17968)
This reverts commit 932282e638.
2023-03-22 12:51:37 -04: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
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
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
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
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
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
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
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
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
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
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
Danica Shen
b231b091b9
fix(17542): fix fiat currency display in few txn actions (#18011)
* fix(17542): fix fiat currency display in few txn actions

* fix(17542): refactor e2e tests to change to fia via fixture builder
2023-03-08 16:05:55 +00:00
Thomas Huang
786a74dbbc
Fix nft test state (#17981) 2023-03-07 08:46:02 -06:00
Matthew Walsh
d0417da3d0
Move desktop code to flask build type (#17960) 2023-03-06 19:35:00 +00:00
micaelae
e77e20d8c4
Bridge tokens by redirecting to Portfolio from wallet overview page (#17952)
* Add Bridge button

* Add newline to the end of bridge svg

* Move Portfolio button

* Vertically center Portfolio button

* Use IconButton for Portfolio button

* Change portfolio button size

* Lowering coverage to get this in for release by a very small amount

* Add unit tests for Portfolio button

---------

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2023-03-06 11:34:06 -08:00
HowardBraham
694773f17a
Upgrading the Import Account modal (#17763)
Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
Co-authored-by: NidhiKJha <nidhi.kumari@consensys.net>
Co-authored-by: montelaidev <monte.lai@consensys.net>
2023-03-06 09:48:28 -08:00
Danica Shen
47d9964a89
fix(17857): show correctly converted account balance in sign&encrypt windows (#17973)
Co-authored-by: Dan J Miller <danjm.com@gmail.com>
2023-03-04 12:14:20 +00:00
Vinicius Stevam
e07ec9dcf3
identify desktop is paired in the metrics event (#17892) 2023-03-02 14:55:27 -06:00
ryanml
6b15d0bae7
Fix incorrect balance in signature request header (#17829)
* Fix incorrect balance in signature request header

* Fix unit tests

* Fix tests and increase unit test coverage

* actually fix unit tests

---------

Co-authored-by: Dan Miller <danjm.com@gmail.com>
2023-03-02 05:40:07 -07:00
Alaa Hadad
5998ae21aa
Buy crypto by redirecting to onramp experience on pdapp instead of deposit popover (#17689)
* feat: disable deposit popover and replace it with global redirect to onramp on pdapp

* feat: remove legacy code for hardcoded onramp providers

* fix: remove unused visuals and components related to legacy code of deposit popover

* fix: remove unused messages

* feat: use a custom hook for all onramps related methods and variables

* fix: modify the custom hook implementation to include test networks

* fix: remove deprecated file buy-url

* fix: remove references for deleted deposit logos

* fix: network-controller failing unit test

* fix: snapshot loading-swaps-quotes-stories-metadata.test.js.snap

* fix: storybook tests

* fix: remove unused constatns related to buyable onramp chains

* fix: remove unused variables and fix eslint

* adding unit test for useRamps custom hook

* feat: add comment on the proper usage of useRamps within confirm-page-container component

* fix: add unit tests for buy button in token-overview page

* fix: add unit test for open the buy crypto URL for a buyable chain ID in token page

* feat: add unit test coverage for eth-overview page

* fix: update locales
2023-03-01 12:45:27 +04:00
David Walsh
eb380f92ef
UX: Icon: Remove unwanted aria label (#17903) 2023-02-27 10:43:06 -06:00
David Walsh
5561987fed
UX: Icon: Stop using fa-times (#17811) 2023-02-27 10:42:02 -06:00
Frederik Bolding
64bfe6f307
Fix a bug where non-address types would be rendered as addresses in EIP-712 (#17846)
* Fix EIP-712 rendering logic

* Fix tests

* Fix tests and story

* Fix lint

* Fix import

* Fix stories
2023-02-27 17:32:51 +01:00
Filip Sekulic
932282e638
What's new - OpenSea security provider (#16831) 2023-02-27 10:20:22 -06:00
David Walsh
e20c70efd5
UX: Update Settings Icon (#17561)
* UX: Update Settings Icon

* Remove font-awesome usage

* Remove from files to convert

* Fix lint
2023-02-26 20:42:03 -06:00
Niranjana Binoy
bc19856d5d
Transaction-list-item-details pop up to display the correct token information on token approve item (#17422) 2023-02-24 14:21:55 -05:00
Nidhi Kumari
9f17e2f94b
UX Icon: updated fa-exclamation-circle (#17879) 2023-02-24 12:52:11 -06:00
David Walsh
e3380ba3ae
UX: Icon: Remove fa-exclamation-triangle usages (#17691)
* UX: Icon: WIP: Remove fa-exclamation-triangle usages

* Swap the rest of the icons

* Fix color import

* Update ui/pages/onboarding-flow/secure-your-wallet/skip-srp-backup-popover.stories.js

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

* Update ui/pages/onboarding-flow/secure-your-wallet/skip-srp-backup-popover.stories.js

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

* Update ui/pages/onboarding-flow/secure-your-wallet/skip-srp-backup-popover.stories.js

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

* Update ui/pages/onboarding-flow/secure-your-wallet/skip-srp-backup-popover.js

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

* Update ui/components/app/add-network/add-network.js

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

* Update ui/components/ui/review-spending-cap/review-spending-cap.js

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

* Fix lint

* Fix alignment and sizes

* Use IconColor

* Update ui/components/app/custom-spending-cap/custom-spending-cap-tooltip.js

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

* Update ui/components/app/confirmation-warning-modal/confirmation-warning-modal.js

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

* Update ui/components/app/signature-request-original/signature-request-original-warning/signature-request-original-warning.js

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

* Update ui/components/ui/review-spending-cap/review-spending-cap.js

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

* Update ui/pages/onboarding-flow/secure-your-wallet/skip-srp-backup-popover.js

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

* Fix imports

* Use IconColor

---------

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
Co-authored-by: George Marshall <george.marshall@consensys.net>
Co-authored-by: Danica Shen <zhaodanica@gmail.com>
2023-02-23 15:20:07 -06:00
David Walsh
09a170bfe2
UX: Icons: Remove icon-import (#17816)
* UX: Icons: Remove icon-import

* Add new icon
2023-02-23 15:19:23 -06:00