From 286a91c67b1da5b264eface31466ffdc57043de3 Mon Sep 17 00:00:00 2001 From: Asher Dawes Date: Wed, 11 Oct 2023 11:15:50 -0700 Subject: [PATCH 1/3] Update conf file generation --- routes/api/daemonControl.js | 23 +++++++++++++++++++++-- routes/api/native/verusbridge/vethconf.js | 17 +++++++++-------- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/routes/api/daemonControl.js b/routes/api/daemonControl.js index 07d554b8..f2fda772 100644 --- a/routes/api/daemonControl.js +++ b/routes/api/daemonControl.js @@ -58,7 +58,7 @@ module.exports = (api) => { api.writeRpcUser = (confFile) => { return new Promise((resolve, reject) => { api.log(`creating rpcuser for ${confFile}...`, "native.process"); - fs.appendFile(confFile, '\nrpcuser=verusdesktop') + fs.appendFile(confFile, `\nrpcuser=${generateRpcPassword()}`) .then(resolve) .catch(e => reject(e)) }) @@ -72,7 +72,22 @@ module.exports = (api) => { .catch(e => reject(e)) }) } - + api.writeRpcHost = (confFile) => { + return new Promise((resolve, reject) => { + api.log(`setting rpchost for ${confFile}...`, "native.process"); + fs.appendFile(confFile, '\nrpchost=127.0.0.1') + .then(resolve) + .catch(e => reject(e)) + }) + } + api.writeRpcAllowIP = (confFile) => { + return new Promise((resolve, reject) => { + api.log(`setting rpcallowip for ${confFile}...`, "native.process"); + fs.appendFile(confFile, '\nrpcallowip=127.0.0.1') + .then(resolve) + .catch(e => reject(e)) + }) + } api.writeRpcPort = (coin, confFile, fallbackPort) => { return new Promise((resolve, reject) => { api.log(`creating rpcport for ${confFile}...`, "native.process"); @@ -220,6 +235,8 @@ module.exports = (api) => { api.confFileIndex[coin] = confFile; if (coin === 'VRSCTEST') { return Promise.all([ + api.writeRpcHost(confFile), + api.writeRpcAllowIP(confFile), api.writeRpcPort(coin, confFile, fallbackPort), api.writeRpcPassword(confFile), api.writeRpcUser(confFile), @@ -227,6 +244,8 @@ module.exports = (api) => { ]); } else { return Promise.all([ + api.writeRpcHost(confFile), + api.writeRpcAllowIP(confFile), api.writeRpcPort(coin, confFile, fallbackPort), api.writeRpcPassword(confFile), api.writeRpcUser(confFile) diff --git a/routes/api/native/verusbridge/vethconf.js b/routes/api/native/verusbridge/vethconf.js index c159fcba..42244bee 100644 --- a/routes/api/native/verusbridge/vethconf.js +++ b/routes/api/native/verusbridge/vethconf.js @@ -3,6 +3,7 @@ const os = require("os"); const path = require("path"); var ini = require("ini"); const fixPath = require("fix-path"); +const {generateRpcPassword} = require("../../utils/auth/rpcAuth"); const INIKeys = { rpcuser: "", @@ -38,24 +39,24 @@ const vethFolder = { const RPCDefault = { VRSCTEST: { - rpcuser: "user", - rpcpassword: "password", - rpcport: 8000, + rpcuser: `${generateRpcPassword()}`, + rpcpassword: `${generateRpcPassword()}`, + rpcport: 8002, rpchost: "127.0.0.1", delegatorcontractaddress: "empty", testnet: true, privatekey: "empty", - ethnode: "empty", + ethnode: "wss://goerli.infura.io/ws/v3/........", }, VRSC: { - rpcuser: "username", - rpcpassword: "password", - rpcport: 8000, + rpcuser: `${generateRpcPassword()}`, + rpcpassword: `${generateRpcPassword()}`, + rpcport: 8002, rpchost: "127.0.0.1", delegatorcontractaddress: "empty", testnet: false, privatekey: "empty", - ethnode: "wss://rinkeby.infura.io/ws/v3/........", + ethnode: "wss://mainnet.infura.io/ws/v3/........", }, }; From 853834d876fd0cd6de1d7ce69ab63a3a803b254f Mon Sep 17 00:00:00 2001 From: Asher Dawes Date: Wed, 11 Oct 2023 17:50:24 -0700 Subject: [PATCH 2/3] Update bridgekeeper --- yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index 9d1ba376..f730ddab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7729,7 +7729,7 @@ verror@^1.10.0: "verus_bridgekeeper@git+https://github.com/VerusCoin/verusbridgekeeper.git": version "1.0.6" - resolved "git+https://github.com/VerusCoin/verusbridgekeeper.git#f602a60a93b0b7058931f24c098d28a9271fce01" + resolved "git+https://github.com/VerusCoin/verusbridgekeeper.git#028ad29b380715c4e41c3840e9ace1a6bf8e3370" dependencies: axios "0.25.0" base58check "^2.0.0" From 4712705de2d8e87d16b221af7e605b2369960a98 Mon Sep 17 00:00:00 2001 From: Asher Dawes Date: Wed, 11 Oct 2023 17:50:31 -0700 Subject: [PATCH 3/3] Update version --- .gitlab-ci.yml | 4 ++-- package.json | 2 +- version.json | 2 +- version_build | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 705792a2..7f5cec38 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,8 +8,8 @@ stages: variables: DOCKER_DRIVER: overlay2 DEFAULT_VERUSCOIN_BRANCH: release - VERUS_VERSION: 1.1.1-6 - VERUSCOIN_VERSION: 1.1.1-6 + VERUS_VERSION: 1.1.1-7 + VERUSCOIN_VERSION: 1.1.1-7 KOMODO_VERSION: 0.8.0 KOMODO_DOWNLOAD_URL: https://github.com/KomodoPlatform/komodo/releases/download PIRATE_VERSION: 5.7.5 diff --git a/package.json b/package.json index 0b95a08f..90e59dfe 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "verus-desktop", "productName": "Verus-Desktop", - "version": "1.1.1-6", + "version": "1.1.1-7", "description": "Verus Desktop Wallet App", "main": "main.js", "scripts": { diff --git a/version.json b/version.json index e6c7a4a3..f40a05d3 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { - "version": "1.1.1-6", + "version": "1.1.1-7", "minVersion": "1.1.1-1", "versionUrl": "https://raw.githubusercontent.com/VerusCoin/Verus-Desktop/master/version.json", "repository": "https://github.com/VerusCoin/Verus-Desktop/" diff --git a/version_build b/version_build index 19029e67..43995a0e 100644 --- a/version_build +++ b/version_build @@ -1 +1 @@ -1.1.1-6 \ No newline at end of file +1.1.1-7 \ No newline at end of file