codybutz / yoroi-frontend

Yoroi Wallet - Chrome extension (React frontend)

Home Page:https://yoroi-wallet.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Yoroi - Cardano ADA wallet

Contributing

Check out our documents on the governance of this project.

First-time setup (or branch change)

SETUP.md

TOOLS.md

Build Yoroi Chrome extension

Extension can be built for both the Cardano mainnet and testnet:

  • Localhost (recommended)
# build files to './dev'
$ npm run dev
  • Mainnet
# build files to './build'
$ npm run build -- --env "mainnet"
  • Testnet (not supported yet)
# build files to './build'
$ npm run build -- --env "testnet"

Run Yoroi Chrome extension

  1. Open new webpage with chrome://extensions
  2. Turn on the developer mode (checkbox in the top right-hand corner)
  3. Press Load unpacked
  4. Select either dev or build folder (depending which npm command you ran)

Note: dev should hot reload on code change

Run Yoroi Firefox extension

Debug builds are not maintained for Firefox as firefox rejects manifest files with non-https localhost in them. You can bypass this by manually adding the extension into your Firefox folder but this is kind of tedious. I suggest instead installing the mainnet build as it does not use localhost. (through about:debugging or about:addons). See SETUP.md for how to makes the unittests pass.

Build release candidate

RELEASE.md

Test

Selenium + Cucumber

You must run npm run test-prepare before running the tests!

test-prepare will BUILD the extension and then the tests will LOAD the extension.

Rerun test-prepare 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-e2e-chrome
# How to run one .feature file (One feature file = one covered component from youtrack)
$ npm run test-by-feature feature/wallet-creation.feature
# How to run one test.
$ npm run test-by-tag @it-10

Jest

We use Jest for unittests.

$ npm run jest

Update Cardano crypto library

In order to update it run the following commands:

# Update js-cardano-wasm
cd js-cardano-wasm;
git checkout master;
git pull origin master;
cd ..;

# Commit the update
git add .
git commit -S -m "${youCommitMessage}"
git push ...

# Re-install the module
$ npm run build-js-cardano-wasm 
$ npm install

# At this point you can go back to Development steps. 

LICENSE

MIT

About

Yoroi Wallet - Chrome extension (React frontend)

https://yoroi-wallet.com/

License:MIT License


Languages

Language:JavaScript 87.4%Language:CSS 7.2%Language:Gherkin 4.7%Language:Shell 0.5%Language:Dockerfile 0.1%Language:HTML 0.1%