ASGARDEX uses following libraries, frameworks and more:
(in alphabetical order)
Install
It's recommended to use a Node version as same as Electron is running with (currently: Electron v9.1.2
/ Node 12.14.1
)
git clone https://github.com/thorchain/asgardex-electron.git asgardex
cd asgardex
yarn
Environment variables
While environment variables are not required (defaults are set), you can configure them. Create an .env
file by copying all content of .env.sample
and change these for your needs.
Development
yarn prebuild
yarn dev
In case Node@12 might run into memory issues locally set --max-old-space-size
as follow:
export NODE_OPTIONS="--max-old-space-size=4096"
How to auto-unlock a locked wallet while hot-reloading the app (for development only, disabled in production build)
Use REACT_APP_WALLET_PASSWORD
to run the app by replacing password
with your own password
REACT_APP_WALLET_PASSWORD=password yarn dev
Or add to REACT_APP_WALLET_PASSWORD=password
to .env
file and run yarn dev
How to enable (more) chains for development
Add chains you want to have for development to REACT_APP_CHAINS_ENABLED
, for example
REACT_APP_CHAINS_ENABLED=THOR,BNB,BTC,ETH,LTC
Note: String of chains have to be as same as definitions in xchain-util
Tests
unit
yarn test
e2e
Note: e2e tests are disabled temporary (see #750)
yarn test:e2e
lint
yarn lint
Note: eslint
is provided by react-scripts
located in ./node_modules/react-scripts/node_modules/
and don't need to be extra installed. If your editor has some issues to find eslint
, you might point it to this location (see VSCode settings file as an example).
bundle analyze
visualize the bundle map using source-map-explorer
yarn analyze
Folder structure
src
src
├── index.ts
├── main
├── renderer
└── shared
src/main
(Electron's "main" app)
src/main
├── electron.ts
├── i18n
└── menu
src/renderer
(Electron's "renderer" app aka ReactJS webapp)
src/renderer
├── assets
├── components
├── contexts
├── helpers
├── hooks
├── i18n
├── index.tsx
├── routes
├── services
├── types
└── views
Security
ASGARDEX follows security recommendation made by Electron team, such as:
Packaging
Important note for macOS
users: Please follow guide of "How to package ASGARDEX
on macOS" before running following command.
yarn package:electron
Keystore
By creating a new wallet or importing an existing one, ASGARDEX is saving wallet's phrase encrypted in keystore.json
on your machine in Electron's appData
folder at following location:
Windows
%APPDATA%/ASGARDEX/storage/keystore.json
%APPDATA%/Electron/storage/keystore.json
macOS
~/Library/Application Support/ASGARDEX/storage/keystore.json
~/Library/Application Support/Electron/storage/keystore.json
Linux
~/.config/ASGARDEX/storage/keystore.json
~/.config/Electron/storage/keystore.json
keystore.json
can be removed in ASGARDEX by clicking "Remove wallet" in Wallet -> Settings
or by removing it manually.
Releasing
See RELEASE.md
Docs
See the docs and guides here
Contributing
Please see the Contributing Guidelines here (coming soon).
Bug Reports
Please see the Bug Report Process here (coming soon).
License
MIT THORChain