From 3f30cba713a6577e6dd23776800963f3ccfe8a63 Mon Sep 17 00:00:00 2001 From: Predrag Manojlovic Date: Tue, 28 Mar 2017 21:28:58 +0200 Subject: [PATCH 01/12] Installers: All: Option re-install renamed to Upgrade --- assets/BitRock Installer Files/IgaunaApp-Linux.xml | 4 ++-- assets/BitRock Installer Files/IgaunaApp-OSX.xml | 4 ++-- assets/BitRock Installer Files/IgaunaApp-Win.xml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/BitRock Installer Files/IgaunaApp-Linux.xml b/assets/BitRock Installer Files/IgaunaApp-Linux.xml index b06e899..c6a931c 100755 --- a/assets/BitRock Installer Files/IgaunaApp-Linux.xml +++ b/assets/BitRock Installer Files/IgaunaApp-Linux.xml @@ -393,8 +393,8 @@ - - Re-install + + Upgrade diff --git a/assets/BitRock Installer Files/IgaunaApp-OSX.xml b/assets/BitRock Installer Files/IgaunaApp-OSX.xml index 9cab01d..99263ef 100755 --- a/assets/BitRock Installer Files/IgaunaApp-OSX.xml +++ b/assets/BitRock Installer Files/IgaunaApp-OSX.xml @@ -303,8 +303,8 @@ - - Re-install + + Upgrade diff --git a/assets/BitRock Installer Files/IgaunaApp-Win.xml b/assets/BitRock Installer Files/IgaunaApp-Win.xml index ccc7206..bc866f3 100755 --- a/assets/BitRock Installer Files/IgaunaApp-Win.xml +++ b/assets/BitRock Installer Files/IgaunaApp-Win.xml @@ -494,8 +494,8 @@ - - Re-install + + Upgrade From d7eba2ce1a5f321baf3641364ee8fd080d14734f Mon Sep 17 00:00:00 2001 From: Predrag Manojlovic Date: Mon, 3 Apr 2017 21:33:32 +0200 Subject: [PATCH 02/12] Now running as normal user --- assets/BitRock Installer Files/IgaunaApp-Linux.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/assets/BitRock Installer Files/IgaunaApp-Linux.xml b/assets/BitRock Installer Files/IgaunaApp-Linux.xml index c6a931c..5716183 100755 --- a/assets/BitRock Installer Files/IgaunaApp-Linux.xml +++ b/assets/BitRock Installer Files/IgaunaApp-Linux.xml @@ -328,7 +328,6 @@ 0 1 1 - 1 1 Uninstall-Agama SuperNETOrg From 619d2ec34ca4f9d89fbf81b67e969f10ffad55db Mon Sep 17 00:00:00 2001 From: Predrag Manojlovic Date: Mon, 3 Apr 2017 22:17:38 +0200 Subject: [PATCH 03/12] Now running as normal user really --- .../IgaunaApp-Linux.xml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/assets/BitRock Installer Files/IgaunaApp-Linux.xml b/assets/BitRock Installer Files/IgaunaApp-Linux.xml index 5716183..3d3eaff 100755 --- a/assets/BitRock Installer Files/IgaunaApp-Linux.xml +++ b/assets/BitRock Installer Files/IgaunaApp-Linux.xml @@ -114,7 +114,7 @@ previous_installation_exists 1 - + @@ -125,7 +125,7 @@ - /etc/${project.vendor}-${project.shortName}.ini + ${user_home_directory}/.${project.vendor}-${project.shortName}.ini ${name}
details
${variable} @@ -279,7 +279,7 @@ 0 - /bin/Agama + ${user_home_directory}/bin/Agama ${installdir}/Agama @@ -288,13 +288,8 @@
Desktop Entry
Office;
- - ${user_home_directory}/Desktop/Agama Desktop.desktop - users - nobody - - /usr/share/applications/Agama Desktop.desktop + ${user_home_directory}/.local/share/applications/Agama Desktop.desktop ${user_home_directory}/Desktop/Agama Desktop.desktop @@ -304,7 +299,7 @@ name variable - /etc/${project.vendor}-${project.shortName}.ini + ${user_home_directory}/.${project.vendor}-${project.shortName}.ini ${name}
details
${variable} @@ -314,7 +309,7 @@ - +
@@ -345,7 +340,7 @@ Installer.Parameter.installdir.description Installer.Parameter.installdir.explanation - /opt/AgamaApp + ${user_home_directory}/.AgamaApp 0 prefix 1 From be3c1901289449a16f3223eaad1bc6aa470ef86b Mon Sep 17 00:00:00 2001 From: Predrag Manojlovic Date: Mon, 3 Apr 2017 22:36:01 +0200 Subject: [PATCH 04/12] Installers: All: removing extra folders --- .../IgaunaApp-Linux.xml | 25 +++++++++++++++++-- .../BitRock Installer Files/IgaunaApp-OSX.xml | 24 +++++++++++++++++- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/assets/BitRock Installer Files/IgaunaApp-Linux.xml b/assets/BitRock Installer Files/IgaunaApp-Linux.xml index 3d3eaff..be86aad 100755 --- a/assets/BitRock Installer Files/IgaunaApp-Linux.xml +++ b/assets/BitRock Installer Files/IgaunaApp-Linux.xml @@ -177,6 +177,28 @@ + + Deleting user data + ${user_home_directory}/.config/Agama + Deleting user data + + + equals + ${previous_installation_exists} + 1 + + + equals + ${installation_type} + uninstall + + + equals + ${delete_user_data} + 1 + + + Deleting zcash params ${user_home_directory}/.zcash-params @@ -328,10 +350,9 @@ SuperNETOrg - /bin/Agama + ${user_home_directory}/bin/Agama & Do you want to launch ${project.fullName} now? - $USER diff --git a/assets/BitRock Installer Files/IgaunaApp-OSX.xml b/assets/BitRock Installer Files/IgaunaApp-OSX.xml index 99263ef..735eab0 100755 --- a/assets/BitRock Installer Files/IgaunaApp-OSX.xml +++ b/assets/BitRock Installer Files/IgaunaApp-OSX.xml @@ -96,7 +96,29 @@ Deleting user data - ${user_home_directory}/Library/Application Support/Iguana + ${user_home_directory}/Library/Application Support/Agama + Deleting user data + + + equals + ${previous_installation_exists} + 1 + + + equals + ${installation_type} + uninstall + + + equals + ${delete_user_data} + 1 + + + + + Deleting user data + ${user_home_directory}/Library/Application Support/iguana Deleting user data From 89a525dc95a5e0510338d9ab8a541383113f4101 Mon Sep 17 00:00:00 2001 From: Predrag Manojlovic Date: Mon, 3 Apr 2017 22:36:16 +0200 Subject: [PATCH 05/12] Installers: All: removing extra folders --- .../BitRock Installer Files/IgaunaApp-Win.xml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/assets/BitRock Installer Files/IgaunaApp-Win.xml b/assets/BitRock Installer Files/IgaunaApp-Win.xml index bc866f3..4377ee1 100755 --- a/assets/BitRock Installer Files/IgaunaApp-Win.xml +++ b/assets/BitRock Installer Files/IgaunaApp-Win.xml @@ -217,6 +217,28 @@ + + Deleting user data + ${windows_folder_appdata}/Iguana + Deleting user data + + + equals + ${previous_installation_exists} + 1 + + + equals + ${installation_type} + uninstall + + + equals + ${delete_user_data} + 1 + + + Deleting zcash params ${windows_folder_appdata}/ZcashParams/ From 98dc2c214924f73ea0b90a1b22bdd35db70b4d7a Mon Sep 17 00:00:00 2001 From: Predrag Manojlovic Date: Tue, 4 Apr 2017 02:03:02 +0200 Subject: [PATCH 06/12] Intallers: Linux: Desktop folder dynamcally detected --- .../BitRock Installer Files/IgaunaApp-Linux.xml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/assets/BitRock Installer Files/IgaunaApp-Linux.xml b/assets/BitRock Installer Files/IgaunaApp-Linux.xml index be86aad..f8b77ed 100755 --- a/assets/BitRock Installer Files/IgaunaApp-Linux.xml +++ b/assets/BitRock Installer Files/IgaunaApp-Linux.xml @@ -110,6 +110,17 @@ + + xdg-user-dir + DESKTOP + desktopDir + + + is_in_path + xdg-user-dir + + + previous_installation_exists 1 @@ -305,14 +316,14 @@ ${installdir}/Agama - ${user_home_directory}/Desktop/Agama Desktop.desktop + ${desktopDir}/Agama Desktop.desktop Categories
Desktop Entry
Office;
${user_home_directory}/.local/share/applications/Agama Desktop.desktop - ${user_home_directory}/Desktop/Agama Desktop.desktop + ${desktopDir}/Agama Desktop.desktop From 0f39535e09e3ec2b79f89613ba14a76c9d52d113 Mon Sep 17 00:00:00 2001 From: Predrag Manojlovic Date: Sat, 3 Jun 2017 16:35:29 +0200 Subject: [PATCH 07/12] All: On upgrade removed .iguana/config.json and .iguana/shepherd --- assets/BitRock Installer Files/IgaunaApp-Linux.xml | 10 ++++++++++ assets/BitRock Installer Files/IgaunaApp-OSX.xml | 10 ++++++++++ assets/BitRock Installer Files/IgaunaApp-Win.xml | 10 ++++++++++ 3 files changed, 30 insertions(+) diff --git a/assets/BitRock Installer Files/IgaunaApp-Linux.xml b/assets/BitRock Installer Files/IgaunaApp-Linux.xml index f8b77ed..1491bc4 100755 --- a/assets/BitRock Installer Files/IgaunaApp-Linux.xml +++ b/assets/BitRock Installer Files/IgaunaApp-Linux.xml @@ -248,6 +248,16 @@ + + Deleting user data + ${user_home_directory}/.iguana/shepherd + Deleting user data + + + Deleting user data + ${user_home_directory}/.iguana/config.json + Deleting user data + 0 Creating ZcashParam directory diff --git a/assets/BitRock Installer Files/IgaunaApp-OSX.xml b/assets/BitRock Installer Files/IgaunaApp-OSX.xml index 735eab0..963059f 100755 --- a/assets/BitRock Installer Files/IgaunaApp-OSX.xml +++ b/assets/BitRock Installer Files/IgaunaApp-OSX.xml @@ -176,6 +176,16 @@ + + Deleting user data + ${user_home_directory}/Library/Application Support/iguana/shepherd + Deleting user data + + + Deleting user data + ${user_home_directory}/Library/Application Support/iguana/config.json + Deleting user data + 0 Creating ZcashParam directory diff --git a/assets/BitRock Installer Files/IgaunaApp-Win.xml b/assets/BitRock Installer Files/IgaunaApp-Win.xml index 4377ee1..862742d 100755 --- a/assets/BitRock Installer Files/IgaunaApp-Win.xml +++ b/assets/BitRock Installer Files/IgaunaApp-Win.xml @@ -277,6 +277,16 @@ + + Deleting user data + ${windows_folder_appdata}/Iguana/shepherd + Deleting user data + + + Deleting user data + ${windows_folder_appdata}/Iguana/config.json + Deleting user data + Downloading files From 3fd093041e1ffe59187a267fc28eb9015c14a62d Mon Sep 17 00:00:00 2001 From: Petr Balashov Date: Tue, 6 Jun 2017 18:32:15 +0200 Subject: [PATCH 08/12] added experimental shepherd cli route --- main.js | 4 ++-- routes/shepherd.js | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index d986083..e04a766 100644 --- a/main.js +++ b/main.js @@ -298,10 +298,10 @@ function createWindow (status) { if (appConfig.edexGuiOnly) { if (appConfig.v2) { shepherd.writeLog('show edex gui'); - //mainWindow.loadURL('http://127.0.0.1:3000'); + mainWindow.loadURL('http://127.0.0.1:3000'); mainWindow.appConfig = appConfig; mainWindow.appSessionHash = appSessionHash; - mainWindow.loadURL('http://' + appConfig.host + ':' + appConfig.agamaPort + '/gui/EasyDEX-GUI/react/build'); + // mainWindow.loadURL('http://' + appConfig.host + ':' + appConfig.agamaPort + '/gui/EasyDEX-GUI/react/build'); } else { shepherd.writeLog('show edex gui'); mainWindow.loadURL('http://' + appConfig.host + ':' + appConfig.agamaPort + '/gui/EasyDEX-GUI/'); diff --git a/routes/shepherd.js b/routes/shepherd.js index 9cfc851..65b9014 100644 --- a/routes/shepherd.js +++ b/routes/shepherd.js @@ -280,6 +280,50 @@ shepherd.quitKomodod = function(chain) { }); } +/* + * type: POST + * params: payload + */ +shepherd.post('/cli', function(req, res, next) { + if (!req.body.payload) { + const errorObj = { + 'msg': 'error', + 'result': 'no payload provided' + }; + + res.end(JSON.stringify(errorObj)); + } else { + const _mode = req.body.payload.mode === 'passthru' ? 'passthru' : 'default'; + const _chain = req.body.payload.chain ? req.body.payload.chain : ''; + const _cmd = req.body.payload.cmd; + + exec(komodocliBin + (_chain ? ' ac_name=' + _chain : '') + ' ' + _cmd, function(error, stdout, stderr) { + console.log('stdout: ' + stdout) + console.log('stderr: ' + stderr) + + if (error !== null) { + console.log('exec error: ' + error) + } + + let responseObj; + + if (stderr) { + responseObj = { + 'msg': 'error', + 'result': stderr + }; + } else { + responseObj = { + 'msg': 'success', + 'result': stdout + }; + } + + res.end(JSON.stringify(responseObj)); + }); + } +}); + /* * type: POST * params: payload From 03bfa854d584148ab8a5aea41f6e58bbc8d39b63 Mon Sep 17 00:00:00 2001 From: pbca26 Date: Tue, 6 Jun 2017 20:17:04 +0300 Subject: [PATCH 09/12] main window dev switch --- gui/EasyDEX-GUI | 2 +- main.js | 8 ++++++-- routes/cache.js | 10 ++++++++++ routes/shepherd.js | 2 +- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/gui/EasyDEX-GUI b/gui/EasyDEX-GUI index 490ddb4..72c3a47 160000 --- a/gui/EasyDEX-GUI +++ b/gui/EasyDEX-GUI @@ -1 +1 @@ -Subproject commit 490ddb48a4472dfd9abf8792674a83688fdae0d3 +Subproject commit 72c3a472674774be19dbd4a512b44e2fbc41d34d diff --git a/main.js b/main.js index e04a766..25cbaa8 100644 --- a/main.js +++ b/main.js @@ -298,10 +298,14 @@ function createWindow (status) { if (appConfig.edexGuiOnly) { if (appConfig.v2) { shepherd.writeLog('show edex gui'); - mainWindow.loadURL('http://127.0.0.1:3000'); mainWindow.appConfig = appConfig; mainWindow.appSessionHash = appSessionHash; - // mainWindow.loadURL('http://' + appConfig.host + ':' + appConfig.agamaPort + '/gui/EasyDEX-GUI/react/build'); + + if (appConfig.dev) { + mainWindow.loadURL('http://127.0.0.1:3000'); + } else { + mainWindow.loadURL('http://' + appConfig.host + ':' + appConfig.agamaPort + '/gui/EasyDEX-GUI/react/build'); + } } else { shepherd.writeLog('show edex gui'); mainWindow.loadURL('http://' + appConfig.host + ':' + appConfig.agamaPort + '/gui/EasyDEX-GUI/'); diff --git a/routes/cache.js b/routes/cache.js index 2a83617..3885102 100644 --- a/routes/cache.js +++ b/routes/cache.js @@ -514,6 +514,16 @@ cache.one = function(req, res, next) { } } }); + + // basilisk balance fallback + const _parsedJSON = JSON.parse(body); + if (key === 'getbalance' && + coin === 'KMD'/* && + ((_parsedJSON && _parsedJSON.balance === 0) || _parsedJSON === [])*/) { + console.log('fallback to kmd explorer'); + //http://kmd.explorer.supernet.org/api/addr/RDbGxL8QYdEp8sMULaVZS2E6XThcTKT9Jd/?noTxList=1 + } + outObj.basilisk[coin][address][key] = {}; outObj.basilisk[coin][address][key].data = JSON.parse(body); outObj.basilisk[coin][address][key].timestamp = Date.now(); // add timestamp diff --git a/routes/shepherd.js b/routes/shepherd.js index 2e9dfb0..0c1fd79 100644 --- a/routes/shepherd.js +++ b/routes/shepherd.js @@ -319,7 +319,7 @@ shepherd.post('/cli', function(req, res, next) { }; } - res.end(JSON.stringify(responseObj)); + res.end(JSON.stringify(responseObj)); }); } }); From 20af5e0c7609c32c73c0653c5640a9937370f97a Mon Sep 17 00:00:00 2001 From: pbca26 Date: Tue, 6 Jun 2017 20:23:41 +0300 Subject: [PATCH 10/12] updated readme --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index 22318b2..52e3611 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,38 @@ Then start Agama App npm start ``` +### Important dev notes +**Use the following config.json for dev ** +Place it in ./iguana folder +``` +{ +"edexGuiOnly": true, +"iguanaGuiOnly": false, +"manualIguanaStart": false, +"skipBasiliskNetworkCheck": true, +"minNotaries": 8, +"host": "127.0.0.1", +"agamaPort": 17777, +"iguanaCorePort": 7778, +"maxDescriptors": { +"darwin": 90000, +"linux": 1000000 +}, +"killIguanaOnStart": true, +"dev": true, +"v2": true, +"useBasiliskInstance": true, +"debug": true, +"iguanaAppPort": 17777, +"forks": { +"basilisk": false, +"all": false +} +} +``` +**Sockets.io** +In dev mode backend is configured to send/receive messages from/to http://127.0.0.1:3000 address. If you open it as http://localhost:3000 sockets server will reject any messages. + #### For end users The instructions to make production build of Agama App will be updated soon. From c9087ce23f9f615ba12eb991180d964887420c71 Mon Sep 17 00:00:00 2001 From: pbca26 Date: Tue, 6 Jun 2017 20:25:32 +0300 Subject: [PATCH 11/12] fixed readme formatting --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 52e3611..fe481ef 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,8 @@ npm start ``` ### Important dev notes -**Use the following config.json for dev ** -Place it in ./iguana folder +#### Use the following config.json for dev +Place it in ./iguana folder. ``` { "edexGuiOnly": true, @@ -53,7 +53,7 @@ Place it in ./iguana folder } } ``` -**Sockets.io** +#### Sockets.io In dev mode backend is configured to send/receive messages from/to http://127.0.0.1:3000 address. If you open it as http://localhost:3000 sockets server will reject any messages. #### For end users From 3943172aeae14b87c644ca9f60cfb5381d130e1f Mon Sep 17 00:00:00 2001 From: michal maxian Date: Fri, 9 Jun 2017 08:29:14 +0200 Subject: [PATCH 12/12] Adding script to build EasyDEX-GUI --- buildscripts/easydex-build.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 buildscripts/easydex-build.sh diff --git a/buildscripts/easydex-build.sh b/buildscripts/easydex-build.sh new file mode 100755 index 0000000..05df38a --- /dev/null +++ b/buildscripts/easydex-build.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# Script to build gui for Agama App + +[ -d ${WORKSPACE}/gui/EasyDEX-GUI ] && cd ${WORKSPACE}/gui/EasyDEX-GUI +[ -d ../gui/EasyDEX-GUI ] && cd ../gui/EasyDEX-GUI +[ -d gui/EasyDEX-GUI ] && cd gui/EasyDEX-GUI + +echo "Building EasyDEX-GUI" +echo "Actual directory is: ${PWD}" + +echo "Checkout to redux branch." +git checkout redux +git pull origin redux + +echo "Installing nodejs modules." +npm install +npm install webpack + +echo "Building EasyDEX-GUI app." +npm run build +echo "EasyDEX-GUI is built!" \ No newline at end of file