Initial setup to have a working environment in Electron
This shell version is at a very infant stage.
Working:
- CRA
- Status bar
- Warnings
- Dapp permission requests
- Show a dapp and communicate via IPC
Voluntarily not added from old shell:
- Everything related to redux
- The Homepage (will be moved to a separate dapp)
Important things missing:
1. The FIXED.
<Connection />
part to ask you to input your token (related to redux)2. Building inject.js (probably needs a separate repo, since this one uses CRA, and I cannot build inject.js without bundling it with the whole app) FIXED
3. Signer, Requests, Plugins
Tutorial to make it work today (because some stuff are still hardcoded):
Insrc/Dapp/Dapp.js
, change line 126 to your path to inject.js (until pb 2 above is fixed)Insrc/index.electron.js
change line 41 to put your own token (until pb 1 above is fixed)- In one terminal tab, run
yarn start
. A working localhost:3000 should open. - In another terminal tab, run
yarn run electron
- If you see
THIS IS THE NEW INJECT.JS!
in the console, it means dapp is using the shell's inject.js (instead of its own inject.js).
Edit: Fixed some stuff.