Define an npm config variable in package.json to specify where the
stylesheets are that we want to lint and update our package scripts to
reference this.
Fix a race condition that could cause the app to think that it is still
syncing even after it has completed and as a result being stuck
reporting 100% syncing during the onboarding process.
`startGrpc` can take some time to fully establish and verify that th
connection is set up as we wait for a successful result from a call to
`getInfo`.
Previously, we would send the `lndSyncing` message to the app only after
`startGrpc` was complete. However, if the syncing process had actually
completed before `startGrpc` then we would first notify that syncing had
completed, only to then notify that it had started after it had already
completed.
In this fix, we notify the app of `lndSyncing` immediately after the
wallet has been unlocked.
Fix#525
I tried running "npm run test" and got a bunch of errors saying "The main process is not built yet. Build it by running "npm run build-main" so just making a note of that in the docs
`main.dev.js` was hard to follow and understand the code flow. It housed
code to handle quite a few distinct things. This is a fairly substantial
refactor of the application startup code in which we:
A new `Neutrino` class has been created with 2 public methods. `start`
and `stop`. `start` will launch a new `lnd` process whilst `stop` will
stop it. This class extends the `EventEmitter` class and emits the
following events based on activity detected from the lnd log output.
- `grpc-proxy-started` - gRPC started
- `wallet-opened` Wallet opened
- `fully-synced` - lnd is all caught up to the blockchain
- `got-block-height` - got updated block height
A new `ZapController` class has been created which houses all of the
logic for intraprocess communication between the main and renderer
processes.
Previously we had several `setInterval` loops that were checking every
second to see if the application status has changed and trigging the
appropriate action if so. This was pretty hard to follow has been
replaced here with more extensive use of promises. This enables us to
act instantly to relevant changes rather than waiting up to 1 second
for the next interval to fire.
Now, the only stuff that lives in `main.dev.js` now is the top level
`app` listeners, which calls out the other parts mentioned above to
bootstrap the application.
Unset the `ELECTRON_DISABLE_SECURITY_WARNINGS` environment variable
which was being used to disable the security checks when testing the app
on ci. This is no longer needed now that we have a more strict Content
Security Policy when the app runs in production mode.
See https://github.com/LN-Zap/zap-desktop/pull/456
Wait until the `dom-ready` event has fired before opening up the
devtools window. This prevents the following error message showing up
multiple times when the app starts in dev mode:
> Extension server error: Operation failed: : has no execution context
See https://github.com/electron/electron/issues/12438Fix#499
It looks like we were a little hasty in #492 as rimraf is used directly
within package.json in the `flow-typed` script and so it needs to remain
as a dev dependency.
See https://github.com/LN-Zap/zap-desktop/pull/492
Concurrently v3.6.0 includes a number of improvements and fixes. Of
particular interest is the new npm command shortcut feature which we can
use to shorten our package scripts a little more.
See https://github.com/kimmobrunfeldt/concurrently/releases/tag/3.6.0
Previously, if the user pushed the back button after supplying a seed word,
then returned and entered the required three, the seed check would fail due to
there being more words supplied than required.