Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev'
Browse files Browse the repository at this point in the history
# Conflicts:
#	.gitlab-ci.yml
#	gui/EasyDEX-GUI
  • Loading branch information
Asherda committed Jul 14, 2019
2 parents 68623df + 93df4c4 commit d57ce6f
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 56 deletions.
33 changes: 15 additions & 18 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -202,4 +199,4 @@ deploy:
- ${AGAMA_WINDOWS_ZIP}.sha256
- ${AGAMA_MACOS}
- ${AGAMA_MACOS}.sha256
expire_in: 1 week
expire_in: 1 week
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
37 changes: 13 additions & 24 deletions routes/api/electrum/proxy.js
Original file line number Diff line number Diff line change
@@ -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) => {
Expand Down Expand Up @@ -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',
};

Expand Down Expand Up @@ -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',
};

Expand Down Expand Up @@ -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',
};

Expand Down Expand Up @@ -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',
};

Expand Down Expand Up @@ -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',
};

Expand Down Expand Up @@ -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',
};

Expand Down Expand Up @@ -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',
};

Expand Down Expand Up @@ -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',
};

Expand Down Expand Up @@ -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',
};

Expand Down Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions routes/api/quitDaemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()]) {
Expand Down Expand Up @@ -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 = [];


Expand Down
2 changes: 1 addition & 1 deletion routes/electrumjs/electrumServers.js
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down
13 changes: 9 additions & 4 deletions routes/shepherd/electrum/proxy.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
//DEPRECATED TODO: DELETE


/*
const request = require('request');
const Promise = require('bluebird');
Expand Down Expand Up @@ -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) => {
Expand Down Expand Up @@ -391,4 +395,5 @@ module.exports = (shepherd) => {
};
return shepherd;
}
}
*/
4 changes: 2 additions & 2 deletions version
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion version_build
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.7-1
0.5.7-4
3 changes: 1 addition & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ [email protected]:

"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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit d57ce6f

Please sign in to comment.