1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-21 17:37:01 +01:00
Commit Graph

123 Commits

Author SHA1 Message Date
George Marshall
006d90fee7
Deprecate JS version of Box in favor of TS version (#19530)
* Initail deprecation messages and updates

* Updating spelling of favour to US spelling favor
2023-06-08 13:37:09 -07:00
David Walsh
b89630fdd2
Release MultiChain 0.5 (#18903)
* Show portfolio icon in ETH overview

* Show new copy button in QR code modal

* Show address copy button in wallet overview

* Update connected status component

* Remove legacy MenuBar

* Remove legacy ImportTokenLink

* Remove AssetListItem

* Remove DetectedTokensLink

* Remove legacy AppHeader

* Remove MULTICHAIN flag from builds.yml

* Remove legacy AccountMenu

* FIX: Token cell snapshot

* Add data-testid for Account Picker

* Remove multichain check in LoadingNetworkScreen

* Remove MULTICHAIN check for AccountDetailsModal

* Remove MULTICHAIN check for AssetList

* Update QR dimensions

* Remove MULTICHAIN declaration from metamaskrc.dist

* Implement PickerNetwork and NetworkListMenu in onboarding

* Remove legacy NetworkDropdown and Dropdown

* Remove documentation about legacy account menu

* FIX: Fixes route tests for missing data-testid=network-display

* Fix account-menu-icon data-testid

* Fix TokenCell test

* FIX Onboarding Flow tests

* Remove unused locales from AccountMenu removal

* E2E: Fix Import Secret Recovery Phrase: logs out of the vault

* E2E: Fix Show account details: should show the QR code for the account

* E2E: Fix add-account.spec.js

* E2E: Fix state-logs.spec.js

* E2E: Fix lock-account.spec.js

* E2E: Fix settings-general.spec.js

* E2E: Fix advanced-settings.spec.js

* E2E: Fix auto-lock.spec.js

* E2E: Fix backup-restore.spec.js

* E2E: Fix clear-activity.spec.js

* E2E: Fix settings-search.spec.js

* E2E: Fix encrypt-decrypt.spec.js

* E2E: Fix dapp-interactions.spec.js

* E2E: Fix test-snap-management.spec.js

* E2E: Fix add-custom-network.spec.js

* E2E: Fix from-import-ui.spec.js

* E2E: Fix provider-api.spec.js

* E2E: Fix chain-interactions.spec.js

* E2E: Fix custom-rpc-history.spec.js

* Remove network icon from overview components

* E2E: Fix user-actions-benchmark.js

* E2E: Fix benchmark.js

* E2E: Fix add-hide-token.spec.js

* E2E: Fix address-book.spec.js

* E2E: Fix custom-token-add-approve.spec.js

* E2E: Fix incremental-security.spec.js

* E2E: Fix metamask-responsive-ui.spec.js

* E2E: Onboarding.spec.js

* E2E: Fix permissions.spec.js

* E2E: Fix send-hex-address.spec.js

* E2E: Fix send-to-contract.spec.js

* Remove dead AccountOptionsMenu test

* E2E: Fix token-details.spec.js

* E2E: Fix switch-custom-network.spec.js

* E2E: Fix metamask-ui.spec.js

* Revert "UX Multichain: updated border top for activity list (#19176)"

This reverts commit 15598f2a23.

* E2Es: Fix test-snap-management.spec.js and test-snap-notification.spec.js

* E2Es: Fix add-account.spec.js after flaky test fixes

* e2e flaky test

* adds back the mmi options

* scss fix

* test fix

* removes unnecessary double quotes

* Prevent double logos on login screen

* Update ui/components/ui/list-item/index.scss

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

---------

Co-authored-by: seaona <mariona@gmx.es>
Co-authored-by: Antonio Regadas <antonio.regadas@consensys.net>
Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-06-01 16:14:38 -05:00
Jyoti Puri
599bef9dc5
Adding documentation for confirmation code cleanup (#17975) 2023-04-18 22:31:45 +05:30
Matthew Walsh
ff20873c65
Add documentation for creating new confirmations (#18317) 2023-03-29 16:01:05 +01:00
Jyoti Puri
f1fa0b03e8
Adding details document about confirmation pages frontend refactoring (#17742) 2023-02-21 14:52:00 +05:30
George Marshall
e269790ff4
Removing TEXT_VARIANTS in favour of TextVariant (#17674) 2023-02-09 16:09:33 -08:00
Pedro Figueiredo
26f6ae4c7c
Add testing documentation (#17411)
* Add testing documentation

* Implement diff filtering by regex

* change to relative import
2023-02-09 17:08:48 +00:00
Ariella Vu
0349c6ba16
[doc] add Jest debugging guide (docs/tests/jest.md) (#17594)
* docs: add tests/jest.md debugging guide

* docs:jest.md: add basic test command

* README.md: add docs/tests/jest.md link
2023-02-06 20:03:22 +07:00
Jyoti Puri
aa8ea48fd8
Detailed document for refactoring signature request pages in extension (#17456) 2023-02-02 20:22:27 +05:30
Dan J Miller
34c4122013
Update forking-mainnet-for-testing.md (#16235)
* Update forking-mainnet-for-testing.md

Add missing important piece of documentation

* Update docs/forking-mainnet-for-testing.md

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

* Update docs/forking-mainnet-for-testing.md

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

* Update for yarn 3

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-01-19 06:18:53 -07:00
Peter Yinusa
6cca9892b2
refactor sentryHooks object (#16435) 2022-11-09 19:28:32 +00:00
Mark Stacey
6ff8044421
Remove obsolete builds (#16430)
The `brave` and `opera` builds are obsolete; in practice we have been
using the Chrome build for those browsers, because they are based upon
Chromium and are compatible with the Chrome extension API.
2022-11-09 05:57:35 -10:00
Peter Yinusa
0b4532ec1b
E2e test fixtures (#16061)
* remove state.json files

* move file

* Update Readme

* Create fixture builder

* load test fixture

* remove redundant method

* update snap tests

* update stats tests

* update extension tests

* update extension tests

* Update fixture data

* snap test dapp connection

* Update fixture data

* add onboarding fixture

* use onboarding fixture

* reuse import account vault

* remove unnecessary use of class

* use fixture builder in new tests

* switch to function

* update default fixture

* update default fixture

* update test

* update 1559 test fixttures

* update 1559 test fixtures

* update 1559 test fixtures

* dismiss 3box whats new

* remove redundant code

* move docs

* remove unused code

* token detection

* use default timeout

* remove redundant code

* Update fixture builder

hide `Protect your funds` dialog
remove browser environment
remove default network details
hide dismiss seed backup reminder
recursively merges fixture data

* add token to tokencontroller

* remove network details

* add missing identities to preference controller

* remove duplicate properties

* update bip-32 to use fixturebuilder

* alphabetise snap permissions

* update get snaps to use fixturebuilder

* Update test-snap-bip-32.spec.js

wait for window

* add popular network state

* update test

* lint
2022-10-28 09:42:12 +01:00
Dan J Miller
7ea31b3f9f
Add documentation on how to fork ganache for local testing (#15944) 2022-09-23 09:41:46 -05:00
legobeat
ef9d5d117b
chore: Adjust trailing whitespace (#15636)
Co-authored-by: ryanml <ryanlanese@gmail.com>
2022-08-24 14:11:49 -05:00
Thomas Huang
3e7d4d314c
Add QA migration guide (#14544)
* Add QA migration guide

* Add full length gif of updating the build

* Use directory term where it seems more appropriate and better formatting
2022-08-02 14:42:50 -07:00
George Marshall
87bba78d1f
Updating all instances of Metamask to MetaMask in content, comments and tests (#14848) 2022-06-03 09:32:50 -07:00
PeterYinusa
273c1dedb7
Docs - segment metrics (#14435)
* expand docs for metrics

* link to docs

* link to docs

* remove obsolete docs

* fix broken link
2022-04-19 16:15:41 +01:00
Erik Marks
b92aab1e87
Update manual build instructions in documentation (#13508)
Updates the "add custom build" instructions for Chrome and Firefox, which were outdated and/or poorly written.
2022-02-22 11:05:22 -08:00
mradziwon
3735a601d9
Update outdated Trezor Emulator link (#13611) 2022-02-16 10:15:22 -06:00
Mariona
6d135d7048
Fix: update URL for adding custom build on Firefox (#12978) 2021-12-06 15:22:25 -03:30
0xdie
77d3f0a3e7
Fix: markdown (#12861) 2021-11-25 14:25:04 -08:00
flada-auxv
3ce4e9ed1f
Fix URL (#11832) 2021-08-13 09:13:10 -07:00
Brad Decker
7d50357684
remove matomo and route to segment (#9646) 2020-10-26 14:05:57 -05:00
Whymarrh Whitby
2ae4720443
Fix words (#9038) 2020-07-20 14:32:49 -02:30
Jenny Pollack
316bf17143
fix-formatting-of-gif (#8767)
i incorrectly added the link id, not sure why it doesn't work the same as for the architecture diagram in the project readme
2020-06-08 23:07:22 +02:00
Jenny Pollack
7af788138b
add gif for loading dev build (#8766) 2020-06-08 22:21:05 +02:00
Whymarrh Whitby
d1cc2cc245
Delete docs/porting_to_new_environment.md (#8704) 2020-05-29 16:23:33 -02:30
Jenny Pollack
e00982aa58
add version dimension to metrics event (#8419)
* add version dimension to metrics event

* mock global.platform.getVersion

Co-authored-by: Erik Marks <rekmarks@protonmail.com>
2020-05-05 15:40:36 +02:00
Whymarrh Whitby
1d654d6c4e
Remove version bump scripts (#8006) 2020-02-06 18:56:31 -03:30
Whymarrh Whitby
96802b84c5
Delete limited_site_access.md (#8007) 2020-02-06 18:26:48 -03:30
Whymarrh Whitby
f928b1f69f
Delete developing-on-deps.md (#8004) 2020-02-06 16:52:38 -03:30
Whymarrh Whitby
d368464b7b
Delete adding-new-networks.md (#7999) 2020-02-06 13:15:46 -03:30
Whymarrh Whitby
7e04be9b58
Delete send-screen-QA-checklist.md (#7998) 2020-02-06 13:07:48 -03:30
Whymarrh Whitby
6f8d65cc61
Delete video_script.txt (#7989) 2020-02-06 12:58:18 -03:30
Whymarrh Whitby
8196818f2e
Delete multi_vault_planning.md (#7988) 2020-02-06 12:52:12 -03:30
Whymarrh Whitby
171d50434a
Delete outdated team page (#7928) 2020-01-29 15:24:11 -03:30
Mark Stacey
0d61f78379
Remove unused PersistentForm (#7770)
This component used to persist form contents to LocalStorage. This was
especially useful for the popup UI, as each time the mouse left the
popup, the UI was completely torn down and state was lost.

This component was only being referenced by one form, and it wasn't
even being used there (e.g. no fields were labelled appropriately to
be persisted).

This was a useful component, and it seems this feature was lost
somewhere in the past couple of years. It was tempting to re-instate it
rather than delete it, but I decided not to because I'd likely approach
the problem differently if we wanted to reinstate it again today (maybe
by using a React Hook, or storing the state in Redux and persisting a
subset of the Redux store instead).
2020-01-10 11:55:27 -04:00
Dan Finlay
4c3bafbc6d
Merge pull request #7705 from luckyyang/patch-1
Update porting_to_new_environment.md
2019-12-16 13:55:31 -08:00
Harry Liu
63fdedc60b
Update docs/porting_to_new_environment.md
Co-Authored-By: Mark Stacey <markjstacey@gmail.com>
2019-12-14 10:15:31 +08:00
Harry Liu
4037b0db11
Update porting_to_new_environment.md 2019-12-13 23:29:37 +08:00
Harry Liu
4a05c793af
Update porting_to_new_environment.md
Fixed broken link. 
Added reference doc link
2019-12-13 11:17:38 +08:00
Dan Finlay
f519fa1ed3
Connect distinct accounts per site (#7004)
* add PermissionsController

remove provider approval controller
integrate rpc-cap
create PermissionsController
move provider approval functionality to permissions controller
add permissions approval ui, settings page
add permissions activity and history
move some functionality to metamask-inpage-provider
rename siteMetadata -> domainMetadata

add accountsChange notification to inpage provider
move functionality to inpage provider
update inpage provider
Remove 'Connections' settings page (#7369)
add hooks for exposing accounts in settings
rename unused messages in non-English locales

Add external extension id to metadata (#7396)

update inpage provider, rpc-cap
add eth_requestAccounts handling to background
prevent notifying connections if extension is locked
update inpage provider
Fix lint errors
add migration
review fixes
transaction controller review updates
removed unused messages

* Login Per Site UI (#7368)

* LoginPerSite original UI changes to keep

* First commit

* Get necessary connected tab info for redirect and icon display for permissioned sites

* Fix up designs and add missing features

* Some lint fixes

* More lint fixes

* Ensures the tx controller + tx-state-manager orders transactions in the order they are received

* Code cleanup for LoginPerSite-ui

* Update e2e tests to use new connection flow

* Fix display of connect screen and app header after login when connect request present

* Update metamask-responsive-ui.spec for new item in accounts dropdown

* Fix approve container by replacing approvedOrigins with domainMetaData

* Adds test/e2e/permissions.spec.js

* Correctly handle cancellation of a permissions request

* Redirect to home after disconnecting all sites / cancelling all permissions

* Fix display of site icons in menu

* Fix height of permissions page container

* Remove unused locale messages

* Set default values for openExternalTabs and tabIdOrigins in account-menu.container

* More code cleanup for LoginPerSite-ui

* Use extensions api to close tab in permissions-connect

* Remove unnecessary change in domIsReady() in contentscript

* Remove unnecessary private function markers and class methods (for background tab info) in metamask-controller.

* Adds getOriginOfCurrentTab selector

* Adds IconWithFallback component and substitutes for appropriate cases

* Add and utilize font mixins

* Remove unused  method in disconnect-all.container.js

* Simplify buttonSizeLarge code in page-container-footer.component.js

* Add and utilize getAccountsWithLabels selector

* Remove console.log in ui/app/store/actions.js

* Change last connected time format to yyyy-M-d

* Fix css associated with IconWithFallback change

* Ensure tracked openNonMetamaskTabsIDs are correctly set to inactive on tab changes

* Code cleanup for LoginPerSite-ui

* Use reusable function for modifying openNonMetamaskTabsIDs in background.js

* Enables automatic switching to connected account when connected domain is open

* Prevent exploit of tabIdOriginMap in background.js

* Remove unneeded code from contentscript.js

* Simplify current tab origin and window opener logic using remotePort listener tabs.queryTabs

* Design and styling fixes for LoginPerSite-ui

* Fix permissionHistory and permission logging for eth_requestAccounts and eth_accounts

* Front end changes to support display of lastConnected time in connected and permissions screens

* Fix lint errors

* Refactor structure of permissionsHistory

* Fix default values and object modifications for domain and permissionsHistory related data

* Fix connecting to new accounts from modal

* Replace retweet.svg with connect-white.svg

* Fix signature-request.spec

* Update metamask-inpage-provider version

* Fix permissions e2e tests

* Remove unneeded delay from test/e2e/signature-request.spec.js

* Add delay before attempting to retrieve network id in dapp in ethereum-on=.spec

* Use requestAccountTabIds strategy for determining tab id that opened a given window

* Improve default values for permissions requests

* Add some message descriptions to app/_locales/en/messages.json

* Code clean up in permission controller

* Stopped deep cloning object in mapObjectValues

* Bump metamask-inpage-provider version

* Add missing description in app/_locales/en/messages.json

* Return promises from queryTabs and switchToTab of extension.js

* Remove unused getAllPermissions function

* Use default props in icon-with-fallback.component.js

* Stop passing  to permissions controller

* Delete no longer used clear-approved-origins modal code

* Remove duplicate imports in ui/app/components/app/index.scss

* Use URL instead of regex in getOriginFromUrl()

* Add runtime error checking to platform, promise based extension.tab methods

* Support permission requests from external extensions

* Improve font size and colour of the domain origin on the permission confirmation screen

* Add support for toggling permissions

* Ensure getRenderablePermissionsDomains only returns domains with exposedAccount caveat permissions

* Remove unused code from LoginPerSite-ui branch

* Ensure modal closes on Enter press for new-account-modal.component.js

* Lint fix

* fixup! Login Per Site UI (#7368)

* Some code cleanup for LoginPerSite

* Adds UX for connecting to dapps via the connected sites screen (#7593)

* Adds UX for connecting to dapps via the connected sites screen

* Use openMetaMaskTabIds from background.js to determine if current active tab is MetaMask

* Delete unused permissions controller methods

* Fixes two small bugs in the LoginPerSite ui (#7595)

* Restore `providerRequest` message translations (#7600)

This message was removed, but it was replaced with a very similar
message called `likeToConnect`. The only difference is that the new
message has "MetaMask" in it. Preserving these messages without
"MetaMask" is probably better than deleting them, so these messages
have all been restored and renamed to `likeToConnect`.

* Login per site no sitemetadata fix (#7610)

* Support connected sites for which we have no site metadata.

* Change property containing subtitle info often populated by origin to a more accurate of purpose name

* Lint fix

* Improve disconnection modal messages (#7612)

* Improve disconnectAccountModalDescription and disconnectAllModalDescription messages

* Update disconnectAccountModalDescription app/_locales/en/messages.json

Co-Authored-By: Mark Stacey <markjstacey@gmail.com>

* Improve disconnectAccount modal message clarity

* Adds cancel button to the account selection screen of the permissions request flow (#7613)

* Fix eth_accounts permission language & selectability (#7614)

* fix eth_accounts language & selectability

* fix MetaMask capitalization in all messages

* Close sidebar when opening connected sites (#7611)

The 'Connected Sites' button in the accounts details now closes the
sidebar, if it is open. This was accomplished by pulling the click
handler for that button up to the wallet view component, where another
button already followed a similar pattern of closing the sidebar.

It seemed confusing to me that one handler was in the `AccountsDetails`
container component, and one was handed down from above, so I added
PropTypes to the container component.

I'm not sure that the WalletView component is the best place for this
logic, but I've put it there for now to be consistent with the add
token button.

* Reject permissions request upon tab close (#7618)

Permissions requests are now rejected when the page is closed. This
only applies to the full-screen view, as that is the view permission
requests should be handled in. The case where the user deals with the
request through a different view is handled in #7617

* Handle tab update failure (#7619)

`extension.tabs.update` can sometimes fail if the user interacts with
the tabs directly around the same time. The redirect flow has been
updated to ensure that the permissions tab is still closed in that
case. The user is on their own to find the dapp tab again in that case.

* Login per site tab popup fixes (#7617)

* Handle redirect in response to state update in permissions-connect

* Ensure origin is available to permissions-connect subcomponents during redirect

* Hide app bar whenever on redirect route

* Improvements to handling of redirects in permissions-connect

* Ensure permission request id change handling only happens when page is not null

* Lint fix

* Decouple confirm transaction screen from the selected address (#7622)

* Avoid race condtion that could prevent contextual account switching (#7623)

There was a race condition in the logic responsible for switching the
selected account based upon the active tab. It was asynchronously
querying the active tab, then assuming it had been retrieved later.

The active tab info itself was already in the redux store in another
spot, one that is guaranteed to be set before the UI renders. The
race condition was avoided by deleting the duplicate state, and using
the other active tab state.

* Only redirect back to dapp if current tab is active (#7621)

The "redirect back to dapp" behaviour can be disruptive when the
permissions connect tab is not active. The purpose of the redirect was
to maintain context between the dapp and the permissions request, but
if the user has already moved to another tab, that no longer applies.

* Fix JSX style lint errors

* Remove unused state
2019-12-03 09:35:56 -08:00
kumavis
59f18e3207 dev - move gource instructions from docs to development script 2019-09-10 22:05:16 +08:00
Whymarrh Whitby
facb00023a
Revert "[ImgBot] Optimize images" (#7027)
This reverts commit 45534d9908.

I'm reverting this commit due to trust issues with the author,
these images can be re-optimized.
2019-08-16 12:32:02 -02:30
Mark Stacey
1fd3dc9ecf
Switch from npm to yarn (#6843)
As a solution to the constant lockfile churn issues we've had with
`npm`, the project now uses `yarn` to manage dependencies.

The `package-lock.json` file has been replaced with `yarn.lock`, which
was created using `yarn import`. It should approximate the contents of
`package-lock.json` fairly well, though there may be some changes due to
deduplication. The codeowners file has been updated to reference this
new lockfile.

All documentation and npm scripts have been updated to reference `yarn`
rather than `npm`. Note that running scripts using `npm run` still works
fine, but it seemed better to switch those to `yarn` as well to avoid
confusion.

The `npm-audit` Bash script has been replaced with `yarn-audit`. The
output of `yarn audit` is a bit different than `npm audit` in that it
returns a bitmask to describe which severity issues were found. This
made it simpler to check the results directly from the Bash script, so
the associated `npm-audit-check.js` script was no longer required. The
output should be exactly the same, and the information is still sourced
from the same place (the npm registry).

The new `yarn-audit` script does have an external dependency: `jq`.
However, `jq` is already assumed to be present by another CI script, and
is present on all CI images we use. `jq` was not added to `package.json`
as a dependency because there is no official package on the npm
registry, just wrapper scripts. We don't need it anywhere exept on CI
anyway.

The section in `CONTRIBUTING` about how to develop inside the
`node_modules` folder was removed, as the advice was a bit dated, and
wasn't specific to this project anyway.
2019-07-30 15:36:23 -03:00
Whymarrh Whitby
618c1caf40
Update publishing doc to reflect automation (#6899) 2019-07-30 10:53:04 -02:30
Mark Stacey
429030a00e
Remove unused unlockAccountMessage callback (#6905)
This callback has been unused for a long time. It was removed in #1076
2019-07-24 23:40:22 -03:00
Dan Finlay
78cdee23c0
Abstract domain provider from its stream transport (#6670)
* Abstract domain provider from its stream transport

Creating new provider-consuming extensions, like [a new
platform](https://github.com/MetaMask/metamask-extension/blob/develop/docs/porting_to_new_environment.md)
can be frustrating for new contributors because our provider
construction has been tangled with our streaming interface.

Here I've broken up our streaming domain connection from the provider
construction, so developers can more easily construct local and
domain-restricted providers without dealing with streams.

* Abstract public API from stream interface

* clean up noop

* Document non-streaming interface

* getSiteMetadata must be async

* Clean up filters on stream end

* Document cleaning up filters

* Allow named filterMiddleware to be cleaned up

* Linted

* Require site metadata

* Destroy any destroyable middleware during cleanup

* Lint
2019-07-15 16:28:04 -07:00
Mark Stacey
b316dd1c40
Remove outdated development tools and documentation (#6845)
These files were referencing npm scripts that no longer existed. Notices
appear to no longer exist, and the `ui-dev.js` module is no longer
actively used.

The `mock-dev.js` module is still used for certain integration tests, so
I've just removed the reference to the non-existent script.
2019-07-15 14:24:37 -03:00