From 4560dffabfc7a7bf6b30e3c925ed03b6e1986a30 Mon Sep 17 00:00:00 2001 From: AhWeiHENGuEi Date: Fri, 4 Nov 2022 10:46:11 +0800 Subject: [PATCH] fix: update climate wallet use port `31314` --- .env.example | 3 ++- .env.submodule | 5 ----- climate-token-driver | 2 +- src/electron/main.tsx | 2 +- src/services/climateService.ts | 5 ++--- 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.env.example b/.env.example index 3dd38550..2d281cb9 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1,3 @@ -CLIMATE_SERVICE=http://localhost:31312 +CLIMATE_SERVICE=http://localhost +CLIMATE_SERVICE_PORT=31314 CLIMATE_WAREHOUSE=https://api.climatewarehouse.chia.net diff --git a/.env.submodule b/.env.submodule index 67b35f2f..7093addf 100644 --- a/.env.submodule +++ b/.env.submodule @@ -1,6 +1 @@ -SERVER_HOST="0.0.0.0" -SERVER_PORT="31312" -BLOCK_START="1500000" -BLOCK_RANGE="10000" -CLIMATE_API_URL="https://api.climatewarehouse.chia.net" MODE="client" diff --git a/climate-token-driver b/climate-token-driver index a599bb68..bfd5ddf4 160000 --- a/climate-token-driver +++ b/climate-token-driver @@ -1 +1 @@ -Subproject commit a599bb687755b4e0039cd8eb512de6806f7ac126 +Subproject commit bfd5ddf4144baa47c1fc59f20afc5d92894321b8 diff --git a/src/electron/main.tsx b/src/electron/main.tsx index 2fe79cef..c7015987 100644 --- a/src/electron/main.tsx +++ b/src/electron/main.tsx @@ -339,7 +339,7 @@ const killTokenPort = (port) => { //app start here app.on('ready', () => { - killTokenPort(31312) + killTokenPort(process.env.CLIMATE_SERVICE_PORT || '31314') app.applicationMenu = createMenu() }) diff --git a/src/services/climateService.ts b/src/services/climateService.ts index c45efcbb..b9f6f1e7 100644 --- a/src/services/climateService.ts +++ b/src/services/climateService.ts @@ -6,10 +6,9 @@ import { TX, } from '@/types/ClimateServiceType' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' -import { ObjectEncodingOptions } from 'fs' - -export const serviceURL = process.env.CLIMATE_SERVICE +export const serviceURL = `${process.env.CLIMATE_SERVICE}:${process.env.CLIMATE_SERVICE_PORT}` +console.log('serviceURL', serviceURL) export const climateServiceApi = createApi({ reducerPath: 'climateServiceApi', baseQuery: fetchBaseQuery({ baseUrl: serviceURL }),