Firefox | Chrome | |
---|---|---|
Mainnet | ||
Shelley testnet |
Looking for Yoroi Mobile? See here
Check out our documents on the governance of this project.
Extension can be built for both Byron mainnet and Jormungandr testnet:
# build files to './dev'
$ npm run dev:byron
This command will run extension as locally-hosted, create a ./dev
directory in the project, and then you can "load unpacked" extension from there. When you stop the running process - extension will stop working, but it also means you can create code-changes while process is running and extension will be hot-reloaded with these changes.
This will connect to the Cardano mainnet with ADA coins having real monetary value.
# build files to './build'
$ npm run prod:byron
This command will create a full build of the extension in the ./build
directory, which you can also "load unpacked" into your browser, and it will not require you to keep a running process to continue working (standalone build).
This will connect to the Cardano mainnet with ADA coins having real monetary value (equal to what users are downloading from browser stores).
# build files to './dev'
$ npm run dev:shelley
# build files to './build'
$ npm run prod:shelley
Same as previous but connects to the [Jormungandr testnet]https://staking.cardano.org/).
- Open new webpage with
chrome://extensions
- Turn on the developer mode (checkbox in the top right-hand corner)
- Press Load unpacked
- Select either
dev
orbuild
folder (depending whichnpm
command you ran)
Note: dev
should hot reload on code change
Debug builds for Firefox require the Debugger for Firefox addon.
You can use the following config in vscode/.launch.json
to launch the debugger.
{
"type": "firefox",
"request": "launch",
"reAttach": true,
"name": "Launch add-on",
"addonPath": "${workspaceFolder}/dev/",
"preferences": {
"security.csp.enable": false
},
"pathMappings": [
{
"url": "webpack:///",
"path": "${workspaceFolder}/"
}
]
},
See SETUP.md for how to makes the unittests pass.
You must run npm run test:build
before running the tests!
test:build
will BUILD the extension and then the tests will LOAD the extension.
Rerun test:build
anytime you make changes to the application itself. If you only change test files, you do not need to rerun it.
# flow
$ npm run flow
# lint
$ npm run eslint
# features (command to run all existing tests)
$ npm run test:run:e2e:chrome
# How to run one .feature file
$ npm run test:run:feature:chrome features/wallet-creation.feature
# How to run one test.
$ npm run test:run:tag:chrome @it-10
We use Jest for unittests.
$ npm run jest