diff --git a/Dockerfile b/Dockerfile index 6cfd2c7..a990b27 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ RUN yarn config --silent set cache-folder .yarn && \ FROM node:14.17-alpine ENV NODE_ENV="production" -ENV APP_VERSION=0.0.1 +ENV APP_VERSION=0.0.3 ENV API_PORT=4242 ENV BITCOIN_NETWORK="mainnet" ENV LNMARKETS_API_URL="https://api.lnmarkets.com" diff --git a/README.md b/README.md index 04692ba..49fcb78 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,7 @@ This environment is linked to the **testnet** version of LN Markets. ### Setting up the app: ```shell - $> cd dev/infra ; docker-compose up -d - $> cd .. docker-compose up -d + $> yarn workspace dev start ``` After launching `infra` for the first time, `bitcoin-testnet` container might takes several minutes to sync to the current state of the bitcoin testnet blockchain. During this time you can start interacting with `lnmarkets_umbrel_lnd` to setup your wallet and channels with LN Markets. diff --git a/apps/front/src/store/futures/getters.js b/apps/front/src/store/futures/getters.js index a085a5c..f26bda0 100644 --- a/apps/front/src/store/futures/getters.js +++ b/apps/front/src/store/futures/getters.js @@ -16,6 +16,6 @@ export default { }, computePL: (state) => { - return state.running.reduce((a, b) => ({ pl: a.pl + b.pl })).pl + return state.running.reduce((a, b) => ({ pl: a.pl + b.pl }), { pl: 0 }).pl }, } diff --git a/dev/package.json b/dev/package.json new file mode 100644 index 0000000..c3b43be --- /dev/null +++ b/dev/package.json @@ -0,0 +1,12 @@ +{ + "name": "dev", + "version": "1.0.0", + "description": "Easy access to dev commands", + "main": "index.js", + "author": "BOTREL Kilian", + "license": "MIT", + "scripts": { + "start": "cd infra && docker-compose up -d ; cd .. ; docker-compose up -d", + "stop": "docker-compose down ; cd infra ; docker-compose down" + } +} diff --git a/package.json b/package.json index eef2336..d6e60b4 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ }, "workspaces": [ "apps/api", - "apps/front" + "apps/front", + "dev" ], "dependencies": { "dotenv": "^10.0.0"