From 0184dcd07b7bad8133b12e8b510a6a1b17b78b48 Mon Sep 17 00:00:00 2001 From: zoop <101409458+zoop-btc@users.noreply.github.com> Date: Wed, 11 Jan 2023 20:18:43 +0100 Subject: [PATCH 1/3] fix: add testnet network back in (#161) * fix: add testnet network back in * fix: TS error hack, until we update client Co-authored-by: Samer Buna --- package.json | 2 +- src/store/config.ts | 7 ++++++- yarn.lock | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 402c1a78..ae4432a5 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ }, "dependencies": { "@apollo/client": "^3.7.3", - "@galoymoney/client": "^0.1.62", + "@galoymoney/client": "0.1.62", "@galoymoney/react": "^0.1.14", "@opentelemetry/api": "^1.1.0", "@opentelemetry/core": "^1.5.0", diff --git a/src/store/config.ts b/src/store/config.ts index 4d5445a9..b5e5cd05 100644 --- a/src/store/config.ts +++ b/src/store/config.ts @@ -31,7 +31,7 @@ if (!isBrowser) { if ( process.env.NETWORK && - !["mainnet", "signet", "signet", "regtest"].includes(process.env.NETWORK) + !["mainnet", "testnet", "signet", "regtest"].includes(process.env.NETWORK) ) { throw new Error("Invalid NETWORK value") } @@ -46,6 +46,11 @@ const networkMap = (graphqlUrl: string): Network => { return "signet" } + if (graphqlUrl.match("testnet")) { + // FIXME: remove casting + return "testnet" as Network + } + return "regtest" } diff --git a/yarn.lock b/yarn.lock index 30171899..e20638b8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -532,7 +532,7 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@galoymoney/client@^0.1.62": +"@galoymoney/client@0.1.62": version "0.1.62" resolved "https://registry.yarnpkg.com/@galoymoney/client/-/client-0.1.62.tgz#5d13ce2c9d0e73c625abdc80a5d7ad730f8ba103" integrity sha512-3YYO7S+zRkAZ85PAaORnI/AyH9WxgxBgZqVKQ1iG7eNq8HMfgj0g2juVUjFJYjBaafLbafXHaAvJ7fShzOJD/w== From 0902fbf008228e7045375d47a5a02bb67f38e8e5 Mon Sep 17 00:00:00 2001 From: Kartik Shah Date: Mon, 16 Jan 2023 19:58:24 +0530 Subject: [PATCH 2/3] ci: update node to 18 in dockerfile (#162) --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 31041d7e..b4ccdb67 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:16-alpine AS BUILD_IMAGE +FROM node:18-alpine AS BUILD_IMAGE ARG CUSTOM_MODULES="default" From 7546e3ba2f78fb8a70abcf94b5f220cfe4be7e16 Mon Sep 17 00:00:00 2001 From: Kartik Shah Date: Mon, 16 Jan 2023 20:46:24 +0530 Subject: [PATCH 3/3] ci: update main node image to 18 in dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b4ccdb67..5542face 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ RUN CUSTOM_MODULES=${CUSTOM_MODULES} yarn build:node && yarn build:files && yarn # FROM gcr.io/distroless/nodejs:16 -FROM node:16-alpine +FROM node:18-alpine ARG CUSTOM_MODULES="default"