1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/app/scripts
Mark Stacey f763979bed
Add support for one-click onboarding (#7017)
* Add support for one-click onboarding

MetaMask now allows sites to register as onboarding the user, so that
the user is redirected back to the initiating site after onboarding.
This is accomplished through the use of the `metamask-onboarding`
library and the MetaMask forwarder.

At the end of onboarding, a 'snackbar'-stype component will explain to the
user they are about to be moved back to the originating dapp, and it will
show the origin of that dapp. This is intended to help prevent phishing
attempts, as it highlights that a redirect is taking place to an untrusted
third party.

If the onboarding initiator tab is closed when onboarding is finished,
the user is redirected to the onboarding originator as a fallback.

Closes #6161

* Add onboarding button to contract test dapp

The `contract-test` dapp (run with `yarn dapp`, used in e2e tests) now
uses a `Connect` button instead of connecting automatically. This
button also serves as an onboarding button when a MetaMask installation
is not detected.

* Add new static server for test dapp

The `static-server` library we were using for the `contract-test` dapp
didn't allow referencing files outside the server root. This should
have been possible to work around using symlinks, but there was a bug
that resulted in symlinks crashing the server.

Instead it has been replaced with a simple static file server that
will serve paths starting with `node_modules` from the project root.
This will be useful in testing the onboarding library without vendoring
it.

* Add `@metamask/onboarding` and `@metamask/forwarder`

Both libraries used to test onboarding are now included as dev
dependencies, to help with testing. A few convenience scripts
were added to help with this (`yarn forwarder` and `yarn dapp-forwarder`)
2019-11-22 13:03:51 -04:00
..
account-import-strategies account-import-strategies - ensure privateKey is prefixed before converting to buffer 2018-06-13 21:06:33 -07:00
controllers Add support for one-click onboarding (#7017) 2019-11-22 13:03:51 -04:00
lib Update Wyre buy ETH URL (#7482) 2019-11-22 11:43:23 -03:30
migrations Add support for one-click onboarding (#7017) 2019-11-22 13:03:51 -04:00
platforms Close window after opening fullscreen (#6966) 2019-08-08 11:50:32 -03:00
background.js Add support for one-click onboarding (#7017) 2019-11-22 13:03:51 -04:00
chromereload.js Fix console.error references 2016-08-29 17:32:39 -07:00
contentscript.js Add support for one-click onboarding (#7017) 2019-11-22 13:03:51 -04:00
createStandardProvider.js Refactor ProviderApprovalController to use rpc and publicConfigStore (#6410) 2019-05-03 13:32:05 -04:00
edge-encryptor.js Enable indent linting via ESLint (#6936) 2019-07-31 10:17:11 -10:00
first-time-state.js controllers - network - move default config out of first-time-state 2018-05-02 18:03:59 -07:00
inpage.js Add support for one-click onboarding (#7017) 2019-11-22 13:03:51 -04:00
metamask-controller.js Add support for one-click onboarding (#7017) 2019-11-22 13:03:51 -04:00
phishing-detect.js Rename accountManager usages (#6790) 2019-07-10 16:31:48 -02:30
README.md add READMEs to folders, re #3427 2018-03-14 15:33:22 +02:00
ui.js Freeze Promise global on boot (#7309) 2019-10-24 06:54:32 -07:00

Main MetaMask Code

This folder contains the core-code.

Currently, it is organized mostly based on file category, like:

controllers, migrations, lib

Ongoing Task

Refactor code-structure, thus the subsystems are reflected on the filesystem.

Examples