diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d32603fad..8582b765b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,9 +8,9 @@ stages: variables: DOCKER_DRIVER: overlay2 DEFAULT_VERUSCOIN_BRANCH: ${CI_COMMIT_REF_NAME} - AGAMA_VERSION: 0.5.7-3 + AGAMA_VERSION: 0.5.7-4 VERUSCOIN_VERSION: 0.5.7-2 - KOMODO_VERSION: 0.3.3b-2-beta + KOMODO_VERSION: 0.4.0a BINARY_SOURCE: VerusCoin EASYDEX_GUI_BUILD: build.tar.gz AGAMA_APPIMAGE: Agama-Linux-v${AGAMA_VERSION}.AppImage @@ -44,7 +44,7 @@ build:linux: VERUS_CLI_LINUX="${BINARY_SOURCE}/${DEFAULT_VERUSCOIN_BRANCH}/Linux/Verus-CLI-Linux-v${VERUSCOIN_VERSION}.tar.gz" POST_COMMENT="${POST_COMMENT}Using ${BINARY_SOURCE}/${DEFAULT_VERUSCOIN_BRANCH} binaries."; else - export POST_COMMENT="${POST_COMMENT}Using ${UPSTREAM_TRIGGER}/${UPSTREAM_CLI_BRANCH} binaries."; fi + export POST_COMMENT="${POST_COMMENT}Using ${UPSTREAM_TRIGGER}/${UPSTREAM_CLI_BRANCH} binaries."; fi - cd gui/EasyDEX-GUI/react - yarn install - yarn run build @@ -53,10 +53,10 @@ build:linux: - gsutil cp $STAGING/$VERUS_CLI_LINUX . - tar -xzvf Verus-CLI-Linux-v${VERUSCOIN_VERSION}.tar.gz --strip=1 --directory assets/bin/linux64/verusd - rm Verus-CLI-Linux-v${VERUSCOIN_VERSION}.tar.gz - - gsutil cp $STAGING/linux64.tar.gz . - - tar -xzvf linux64.tar.gz --strip=1 --directory assets/bin/linux64 - - rm linux64.tar.gz - - strip -g assets/bin/linux64/komodod && strip -g assets/bin/linux64/komodo-cli + - wget https://github.com/KomodoPlatform/komodo/releases/download/dev-multios-0.4.0a-alpha/linux_0.4.0a.tar.gz + - tar -xzvf linux_${KOMODO_VERSION}.tar.gz --strip=1 --directory assets/bin/linux64 + - rm linux_${KOMODO_VERSION}.tar.gz + - strip --strip-unneeded assets/bin/linux64/komodod && strip --strip-unneeded assets/bin/linux64/komodo-cli - yarn install script: - yarn run dist @@ -105,12 +105,10 @@ build:windows: - gsutil cp $STAGING/$VERUS_CLI_WINDOWS . - unzip -qq Verus-CLI-Windows-v${VERUSCOIN_VERSION}.zip -d assets/bin/win64 - mv assets/bin/win64/verus-cli assets/bin/win64/verusd - - gsutil cp $STAGING/win64.zip . - - unzip win64.zip - - mv win64/* assets/bin/win64 - - rm -rf win64 - - rm win64.zip - - strip -g assets/bin/win64/komodod.exe && strip -g assets/bin/win64/komodo-cli.exe && strip -g assets/bin/win64/komodo-tx.exe + - wget https://github.com/KomodoPlatform/komodo/releases/download/dev-multios-0.4.0a-alpha/windows_0.4.0a.zip + - unzip windows_${KOMODO_VERSION}.zip -d assets/bin + - rm windows_${KOMODO_VERSION}.zip + - strip --strip-unneeded assets/bin/win64/komodod.exe && strip --strip-unneeded assets/bin/win64/komodo-cli.exe && strip --strip-unneeded assets/bin/win64/komodo-tx.exe - rm Verus-CLI-Windows-v${VERUSCOIN_VERSION}.zip - yarn install script: @@ -149,12 +147,11 @@ build:mac: - yarn run build - cd ../../.. - gsutil cp $STAGING/$VERUS_CLI_MACOS . - - gsutil cp $STAGING/macos.tar.gz . + - wget https://github.com/KomodoPlatform/komodo/releases/download/dev-multios-0.4.0a-alpha/macOS_0.4.0a.tar.gz - mkdir -p assets/bin/osx/verusd - tar -xzf Verus-CLI-MacOS-v${VERUSCOIN_VERSION}.tar.gz --strip=1 --directory assets/bin/osx/verusd - - gsutil cp $STAGING/macos.tar.gz . - - tar -xzvf macos.tar.gz --strip=1 --directory assets/bin/osx - - rm macos.tar.gz + - tar -xzvf macOS_${KOMODO_VERSION}.tar.gz --strip=1 --directory assets/bin/osx + - rm macOS_${KOMODO_VERSION}.tar.gz - rm Verus-CLI-MacOS-v${VERUSCOIN_VERSION}.tar.gz - yarn install script: @@ -202,4 +199,4 @@ deploy: - ${AGAMA_WINDOWS_ZIP}.sha256 - ${AGAMA_MACOS} - ${AGAMA_MACOS}.sha256 - expire_in: 1 week \ No newline at end of file + expire_in: 1 week diff --git a/gui/EasyDEX-GUI b/gui/EasyDEX-GUI index 173d64f3b..04420928c 160000 --- a/gui/EasyDEX-GUI +++ b/gui/EasyDEX-GUI @@ -1 +1 @@ -Subproject commit 173d64f3b1d0d7de7e42832c5dec8b08ab2c5852 +Subproject commit 04420928ce5bf2179616b872a27061b7fef40856 diff --git a/package.json b/package.json index 626e4bb07..85c72fc67 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Agama", "productName": "Agama", - "version": "0.5.7-3", + "version": "0.5.7-4", "description": "Agama Wallet Desktop App", "main": "main.js", "scripts": { diff --git a/routes/api/electrum/proxy.js b/routes/api/electrum/proxy.js index 676ea4459..8346dd1d2 100644 --- a/routes/api/electrum/proxy.js +++ b/routes/api/electrum/proxy.js @@ -1,26 +1,15 @@ const request = require('request'); const Promise = require('bluebird'); const { getRandomIntInclusive } = require('agama-wallet-lib/src/utils'); +const { proxyServersHttps } = require('agama-wallet-lib/src/electrum-servers'); // TODO: reduce code // abstraction layer to communicate with electrum proxies -const proxyServers = [{ - ip: '94.130.225.86', - port: 80, -}, { - ip: '94.130.98.74', - port: 80, -}]; - // pick a random proxy server -const _randomServer = proxyServers[getRandomIntInclusive(0, proxyServers.length - 1)]; -const proxyServer = { - ip: _randomServer.ip, - port: _randomServer.port, -}; +const proxyServer = proxyServersHttps[getRandomIntInclusive(0, proxyServersHttps.length - 1)]; -console.log(`proxy server ${proxyServer.ip}:${proxyServer.port}`); +console.log(`proxy server ${proxyServer}`); module.exports = (api) => { /*api.httpReq = (url, type) => { @@ -68,7 +57,7 @@ module.exports = (api) => { return new Promise((resolve, reject) => { const options = { - url: `http://${proxyServer.ip}:${proxyServer.port}/api/getbalance?${makeUrl({ address })}`, + url: `https://${proxyServer}/api/getbalance?${makeUrl({ address })}`, method: 'GET', }; @@ -99,7 +88,7 @@ module.exports = (api) => { return new Promise((resolve, reject) => { const options = { - url: `http://${proxyServer.ip}:${proxyServer.port}/api/listunspent?${makeUrl({ address })}`, + url: `https://${proxyServer}/api/listunspent?${makeUrl({ address })}`, method: 'GET', }; @@ -130,7 +119,7 @@ module.exports = (api) => { return new Promise((resolve, reject) => { const options = { - url: `http://${proxyServer.ip}:${proxyServer.port}/api/listtransactions?${makeUrl({ address })}`, + url: `https://${proxyServer}/api/listtransactions?${makeUrl({ address })}`, method: 'GET', }; @@ -161,7 +150,7 @@ module.exports = (api) => { return new Promise((resolve, reject) => { const options = { - url: `http://${proxyServer.ip}:${proxyServer.port}/api/estimatefee?${makeUrl({ blocks })}`, + url: `https://${proxyServer}/api/estimatefee?${makeUrl({ blocks })}`, method: 'GET', }; @@ -192,7 +181,7 @@ module.exports = (api) => { return new Promise((resolve, reject) => { const options = { - url: `http://${proxyServer.ip}:${proxyServer.port}/api/getblockinfo?${makeUrl({ height })}`, + url: `https://${proxyServer}/api/getblockinfo?${makeUrl({ height })}`, method: 'GET', }; @@ -223,7 +212,7 @@ module.exports = (api) => { return new Promise((resolve, reject) => { const options = { - url: `http://${proxyServer.ip}:${proxyServer.port}/api/getcurrentblock?${makeUrl()}`, + url: `https://${proxyServer}/api/getcurrentblock?${makeUrl()}`, method: 'GET', }; @@ -254,7 +243,7 @@ module.exports = (api) => { return new Promise((resolve, reject) => { const options = { - url: `http://${proxyServer.ip}:${proxyServer.port}/api/gettransaction?${makeUrl({ txid })}`, + url: `https://${proxyServer}/api/gettransaction?${makeUrl({ txid })}`, method: 'GET', }; @@ -285,7 +274,7 @@ module.exports = (api) => { return new Promise((resolve, reject) => { const options = { - url: `http://${proxyServer.ip}:${proxyServer.port}/api/getmerkle?${makeUrl({ txid, height })}`, + url: `https://${proxyServer}/api/getmerkle?${makeUrl({ txid, height })}`, method: 'GET', }; @@ -316,7 +305,7 @@ module.exports = (api) => { return new Promise((resolve, reject) => { const options = { - url: `http://${proxyServer.ip}:${proxyServer.port}/api/gettransaction?${makeUrl()}`, + url: `https://${proxyServer}/api/gettransaction?${makeUrl()}`, method: 'GET', }; @@ -347,7 +336,7 @@ module.exports = (api) => { return new Promise((resolve, reject) => { const options = { - url: `http://${proxyServer.ip}:${proxyServer.port}/api/pushtx`, + url: `https://${proxyServer}/api/pushtx`, method: 'POST', headers: { 'Content-Type': 'application/json', diff --git a/routes/api/quitDaemon.js b/routes/api/quitDaemon.js index 2b51c56d7..8efcecc70 100644 --- a/routes/api/quitDaemon.js +++ b/routes/api/quitDaemon.js @@ -11,7 +11,7 @@ module.exports = (api) => { for (let key in api.coindInstanceRegistry) { if (api.appConfig.native.stopNativeDaemonsOnQuit) { const chain = key !== 'komodod' ? key : null; - let _coindQuitCmd = api.appConfig.reservedChains.indexOf(chain) === -1 ? api.veruscliBin : api.komodocliBin; + let _coindQuitCmd = api.appConfig.reservedChains.indexOf(key) === -1 ? api.veruscliBin : api.komodocliBin; // any coind if (api.nativeCoindList[key.toLowerCase()]) { @@ -85,7 +85,7 @@ module.exports = (api) => { api.post('/coind/stop', (req, res) => { if (api.checkToken(req.body.token)) { const _chain = req.body.chain; - let _coindQuitCmd = api.appConfig.reservedChains.indexOf(_chain) === -1 ? api.veruscliBin : api.komodocliBin; + let _coindQuitCmd = _chain && api.appConfig.reservedChains.indexOf(_chain) === -1 ? api.veruscliBin : api.komodocliBin; let _arg = []; diff --git a/routes/electrumjs/electrumServers.js b/routes/electrumjs/electrumServers.js index 76fbb64cc..71dd326c7 100644 --- a/routes/electrumjs/electrumServers.js +++ b/routes/electrumjs/electrumServers.js @@ -1,5 +1,5 @@ const disableCoins = require('./electrumServersConfig'); -const _electrumServers = require('agama-wallet-lib/src/electrum-servers'); +const _electrumServers = require('agama-wallet-lib/src/electrum-servers').electrumServers; //const fs = require('fs'); const _electrumServersExtend = { diff --git a/routes/shepherd/electrum/proxy.js b/routes/shepherd/electrum/proxy.js index 7d62096a8..cd81d9abe 100644 --- a/routes/shepherd/electrum/proxy.js +++ b/routes/shepherd/electrum/proxy.js @@ -1,3 +1,7 @@ +//DEPRECATED TODO: DELETE + + +/* const request = require('request'); const Promise = require('bluebird'); @@ -28,9 +32,9 @@ const proxyServer = { console.log(`proxy server ${proxyServer.ip}:${proxyServer.port}`); module.exports = (shepherd) => { - /*shepherd.httpReq = (url, type) => { - - };*/ + //shepherd.httpReq = (url, type) => { + // + //}; shepherd.proxyActiveCoin = {}; shepherd.proxy = (network) => { @@ -391,4 +395,5 @@ module.exports = (shepherd) => { }; return shepherd; -} \ No newline at end of file +} +*/ \ No newline at end of file diff --git a/version b/version index 0e76bbaae..bd62adfbd 100644 --- a/version +++ b/version @@ -1,3 +1,3 @@ -version=0.5.7-3 +version=0.5.7-4 type=beta -minversion=0.5.7-3 +minversion=0.5.7-4 diff --git a/version_build b/version_build index 011f7099a..89607b18f 100644 --- a/version_build +++ b/version_build @@ -1 +1 @@ -0.5.7-1 \ No newline at end of file +0.5.7-4 diff --git a/yarn.lock b/yarn.lock index e43283b6c..19de12be8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -60,7 +60,7 @@ after@0.8.2: "agama-wallet-lib@https://github.com/VerusCoin/agama-wallet-lib.git#dev": version "0.3.4" - resolved "https://github.com/VerusCoin/agama-wallet-lib.git#a8cc76bc132d5ab1feb911b4cfa5c15925807fb0" + resolved "https://github.com/VerusCoin/agama-wallet-lib.git#8f3591c71d63492da52fc72d2faf8c00a0e7a54e" dependencies: bigi "^1.4.2" bip32 "^1.0.2" @@ -549,7 +549,6 @@ bitcoin-ops@^1.3.0: "bitcoinjs-lib@https://github.com/SuperNETorg/bitcoinjs-lib.git": version "3.3.2" - uid "2325ac228f03efcd5b39aad8a672e79c407dcf00" resolved "https://github.com/SuperNETorg/bitcoinjs-lib.git#2325ac228f03efcd5b39aad8a672e79c407dcf00" dependencies: bech32 "^1.1.2"