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

83 Commits

Author SHA1 Message Date
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
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
Whymarrh Whitby
f0218bdbbb
Rename accountManager usages (#6790)
Co-Authored-By: Mark Stacey <markjstacey@gmail.com>
2019-07-10 16:31:48 -02:30
filmendless
45534d9908 [ImgBot] Optimize images (#1) (#6829)
*Total -- 5,450.78kb -> 4,473.66kb (17.93%)

/images/404.png -- 38.48kb -> 11.19kb (70.91%)
/images/deadface.png -- 8.14kb -> 4.50kb (44.67%)
/images/cancel.png -- 10.67kb -> 6.04kb (43.38%)
/app/images/key-32.png -- 1.08kb -> 0.68kb (37.66%)
/app/images/coinswitch_logo.png -- 3.06kb -> 1.94kb (36.43%)
/images/info-logo.png -- 31.80kb -> 20.43kb (35.77%)
/docs/transaction-flow.png -- 137.82kb -> 91.38kb (33.7%)
/ui/design/metamask-logo-eyes.png -- 142.65kb -> 94.94kb (33.45%)
/images/coinbase logo.png -- 9.55kb -> 6.43kb (32.64%)
/ui/design/chromeStorePics/screen_dao_accounts.png -- 505.47kb -> 347.03kb (31.34%)
/docs/architecture.png -- 136.94kb -> 94.15kb (31.25%)
/ui/design/chromeStorePics/screen_dao_locked.png -- 280.38kb -> 199.54kb (28.83%)
/app/images/logo.png -- 6.43kb -> 4.58kb (28.81%)
/ui/design/chromeStorePics/screen_wei_account.png -- 638.31kb -> 469.17kb (26.5%)
/images/pw-128x128.png -- 92.76kb -> 69.18kb (25.42%)
/app/images/pw128x128.png -- 92.76kb -> 69.18kb (25.42%)
/app/images/shapeshift logo.png -- 17.13kb -> 13.54kb (20.92%)
/ui/design/02b-metamask-AccDetails-Send.jpg -- 107.56kb -> 92.00kb (14.46%)
/images/icon-128.png -- 5.63kb -> 4.82kb (14.45%)
/ui/design/chromeStorePics/icon-128.png -- 5.63kb -> 4.82kb (14.45%)
/ui/design/02a-metamask-AccDetails.jpg -- 114.81kb -> 99.73kb (13.14%)
/ui/design/02a-metamask-AccDetails-OverTransaction.jpg -- 119.21kb -> 103.65kb (13.06%)
/ui/design/02a-metamask-AccDetails-OverToken.jpg -- 118.99kb -> 103.62kb (12.92%)
/ui/design/wireframes/metamask_wfs_jan_13.png -- 409.24kb -> 357.28kb (12.7%)
/ui/design/chromeStorePics/screen_dao_notification.png -- 289.55kb -> 254.49kb (12.11%)
/ui/design/05-metamask-Menu.jpg -- 127.21kb -> 111.93kb (12.01%)
/app/images/ethereum-metamask-chrome.png -- 58.62kb -> 51.86kb (11.52%)
/ui/design/chromeStorePics/final_screen_dao_accounts.png -- 243.86kb -> 217.46kb (10.82%)
/ui/design/chromeStorePics/promo1400560.png -- 255.51kb -> 228.52kb (10.56%)
/images/icon-512.png -- 41.09kb -> 36.95kb (10.08%)
/ui/design/chromeStorePics/promo920680.png -- 201.87kb -> 181.88kb (9.9%)
/ui/design/chromeStorePics/final_screen_wei_account.png -- 247.44kb -> 223.83kb (9.54%)
/ui/design/chromeStorePics/final_screen_dao_locked.png -- 215.13kb -> 196.06kb (8.87%)
/ui/design/chromeStorePics/final_screen_dao_notification.png -- 209.38kb -> 192.76kb (7.94%)
/ui/design/00-metamask-SignIn.jpg -- 56.49kb -> 53.22kb (5.79%)
/ui/design/03-metamask-Qr.jpg -- 64.50kb -> 60.89kb (5.6%)
/ui/design/01-metamask-SelectAcc.jpg -- 74.28kb -> 70.34kb (5.3%)
/ui/design/02-metamask-AccDetails.jpg -- 74.00kb -> 70.15kb (5.21%)
/ui/design/chromeStorePics/promo440280.png -- 56.12kb -> 53.92kb (3.93%)
/app/images/icon-64.png -- 3.49kb -> 3.40kb (2.66%)
/ui/design/chromeStorePics/icon-64.png -- 3.49kb -> 3.40kb (2.66%)
/images/pw-48x48.png -- 3.20kb -> 3.16kb (1.34%)
/ui/design/chromeStorePics/final_screen_wei_notification.png -- 189.32kb -> 187.93kb (0.73%)
/images/icon-32.png -- 1.69kb -> 1.68kb (0.46%)
2019-07-10 11:37:20 -03:00
Mark O'Sullivan
0311f2d28c Added visual documentation of the account menu component (#6775)
* Added visual documentation of the menu bar component

* updated CHANGELOG.md

* renamed to account menu which is the component highlighted in the screenshot

* updated contributions document
2019-07-05 10:24:30 -02:30
Dan Finlay
76e7c3bd1f
Merge pull request #6589 from MetaMask/DocumentHotfixProtocol
Document hotfix protocol
2019-06-25 15:00:40 -07:00
Dan J Miller
3254738360 MetaMetrics documentation (#6624) 2019-05-20 15:02:26 -02:30
Dan Finlay
ee049aee87 Document hotfix protocol 2019-05-09 12:35:24 -07:00
Christian
50fa063c5d add link to design system
Adding a direct link to the WIP design system file we're building using figma.
2019-04-24 16:30:50 -07:00
bobby dresser
e71cac5460
update publishing.md with dev diagram 2019-04-17 10:30:17 -07:00
Etienne Dusseault
7ceb1c63cc Added Chrome limited site access solution doc (#6422) 2019-04-10 22:56:47 -02:30
Brian R. Bondy
7b13e9ae2e
Update porting_to_new_environment.md
This MetamaskInpageProvider file was moved out into its own repo, this updates the link to point to that repo.
2019-04-08 15:43:34 -04:00
kumavis
12cca73000 doc - publishing - typo fix (#6399) 2019-04-04 16:19:37 -02:30
Chi Kei Chan
31175625b4 Folder restructure (#6304)
* Remove ui/app/keychains/

* Remove ui/app/img/ (unused images)

* Move conversion-util to helpers/utils/

* Move token-util to helpers/utils/

* Move /helpers/*.js inside /helpers/utils/

* Move util tests inside /helpers/utils/

* Renameand move confirm-transaction/util.js to helpers/utils/

* Move higher-order-components to helpers/higher-order-components/

* Move infura-conversion.json to helpers/constants/

* Move all utility functions to helpers/utils/

* Move pages directory to top-level

* Move all constants to helpers/constants/

* Move metametrics inside helpers/

* Move app and root inside pages/

* Move routes inside helpers/

* Re-organize ducks/

* Move reducers to ducks/

* Move selectors inside selectors/

* Move test out of test folder

* Move action, reducer, store inside store/

* Move ui components inside ui/

* Move UI components inside ui/

* Move connected components inside components/app/

* Move i18n-helper inside helpers/

* Fix unit tests

* Fix unit test

* Move pages components

* Rename routes component

* Move reducers to ducks/index

* Fix bad path in unit test
2019-03-21 20:33:30 -02:30
Bruno Barbieri
7287133e15 Enable mobile sync (#6332)
* enable mobile sync

* remove mobile sync as a preference

* Fix typo
2019-03-21 12:43:10 -07:00
Dan Finlay
823007121d Add rollback script, move auto-changelog script (#6252) 2019-03-20 09:48:50 -02:30
Dan Finlay
f507f2a927 Feature Flag + Mobile Sync (#5955) 2019-02-25 15:40:13 -03:30
Whymarrh Whitby
3658ca550a Remove outdated ui dev and ui mock docs 2019-02-20 14:18:46 -03:30
Dan Finlay
160f196165 Add sensitive publishing protocol 2019-02-19 12:35:59 -08:00
Dan Finlay
a6f61d1e22 Make docs links consistent (#5920)
* Make docs links consistent

So our various docs pages inter-link consistently per https://github.com/MetaMask/metamask-docs/issues/1

* Add docs links to internal docs page
2018-12-12 20:48:18 -03:30
Noel Yoo
012f7ddd72 Fix typos (#5471) 2018-10-09 09:29:51 -02:30
satboy78
4b8dea455f fix typos (#5418) 2018-10-03 15:13:14 -02:30
Whymarrh Whitby
d60991ec88 Delete ConfigManager, replacing its usages with PreferencesController 2018-09-11 09:39:16 -07:00
Thomas
138858647e Merge branch 'develop' into network-remove-provider-engine 2018-07-25 22:38:44 -07:00
brunobar79
3025832858 added TREZOR simulator instructions 2018-07-13 20:31:40 -04:00
kumavis
9d77b0a196 Merge branch 'develop' of github.com:MetaMask/metamask-extension into network-remove-provider-engine 2018-06-06 11:08:29 -07:00
Dan Finlay
4cc2273c20
Update publishing.md 2018-05-23 14:58:09 -07:00
Dan Finlay
07cda8264d
Update publishing guide 2018-05-23 14:48:05 -07:00
kumavis
3a80f3dd83 Merge branch 'develop' of github.com:MetaMask/metamask-extension into network-remove-provider-engine 2018-05-22 13:20:04 -07:00
kumavis
45ed187bfe
Merge pull request #4240 from MetaMask/EnhancePortGuide
Enhance guide to porting to new platform
2018-05-21 14:05:49 -07:00
kumavis
f9074a5721 docs - remove references to web3-provider-engine 2018-05-16 21:20:50 -07:00
Dan
5a7e98b3a9 Adds description to send-screen-QA-checklist.md 2018-05-16 12:45:06 -02:30
Dan
86c73eec5c Adds detailed QA checklist for the New UI send screen. 2018-05-16 12:42:05 -02:30
Dan Finlay
db2e564c57 Enhance guide to porting to new platform
It skimmed over the complicated parts before, and left people unsure how
to proceed. I now dive straight into what will confuse them, and provide
links directly to the code that can help clarify.
2018-05-11 10:23:01 -07:00
kumavis
dcd04091cc
Merge pull request #4042 from MetaMask/tx-controller-rewrite-v3
docs and file organization for txController
2018-04-25 16:52:46 -06:00
frankiebee
c20c97ce62 Merge branch 'master' into tx-controller-rewrite-v3 2018-04-19 11:49:11 -07:00
frankiebee
eeb9390de8 meta - transactions - docs yo! 2018-04-19 11:46:15 -07:00
bitpshr
1ef6528921 Add JSDoc to various background scripts 2018-04-18 21:30:13 -04:00
bitpshr
6dbdc87713 Add generated docs 2018-04-18 17:24:36 -04:00
Thomas Huang
7b70804aa0
Merge pull request #3969 from MetaMask/i3966-AddJsDocsPage
Add JSDocs Page and Script
2018-04-17 10:01:09 -07:00
Dan Finlay
b3bf7cd970
Fix spelling typo 2018-04-16 15:08:43 -07:00
Dan Finlay
136caa2034 Add JSDocs Page and Script
Includes new script `npm run doc` for generating docs page.
2018-04-12 14:46:05 -07:00