From ea3c0273807abb9105af2f84561a1a160f631ce6 Mon Sep 17 00:00:00 2001
From: Asher Dawes <asher.dawes@gmail.com>
Date: Sat, 8 Sep 2018 21:25:42 -0700
Subject: [PATCH 01/13] Update README.md (#72)

---
 README.md | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index dbc4cc91f..572b5e9f7 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,9 @@ Check [the VerusCoin github Wiki](https://github.com/VerusCoin/VerusCoin/wiki) f
 Also [check the Discord commnity](https://discordapp.com/channels/444621794964537354/449633547343495172)
 
 This version adds portable VerusHash support for Linux. It was tested against Ubuntu LTS 16 & 18.
-Version 0.3.13 fixes an error in limiting transactions that can cause the GUI to complain that there are not enough funds to send a transaction when funds are sufficient and 
+Version 0.3.13c Integrates the Electrum Server and Verus lite support
+Version 0.3.13b fixed balance verification on send.
+Version 0.3.13a fixes an error in limiting transactions that can cause the GUI to complain that there are not enough funds to send a transaction when funds are sufficient and 
 the list display showing incorrect blocks to maturity in some views.
 Version 0.3.13 Introduced the ability to filter through transactions, added the option
 to automatically load VRSC on startup, added a blocktype display in transaction info, 

From f98b59976f99fb4a773a5c6a48af8da9dd761f63 Mon Sep 17 00:00:00 2001
From: Asher Dawes <Asher.dawes@gmail.com>
Date: Sun, 7 Oct 2018 20:36:55 -0700
Subject: [PATCH 02/13] Updating version

---
 .gitlab-ci.yml    | 44 +++++++++++++++++++++++---------------------
 package-lock.json |  2 +-
 package.json      |  2 +-
 version           |  4 ++--
 version_build     |  2 +-
 5 files changed, 28 insertions(+), 26 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 523844872..ed0053bfe 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,7 +6,7 @@ variables:
   DOCKER_DRIVER: overlay2
   DEFAULT_CLI_BRANCH: dev
   DEFAULT_EASYDEXGUI_BRANCH: dev
-  AGAMA_VERSION: 0.3.13c
+  AGAMA_VERSION: 0.3.19
   EASYDEX_GUI_BUILD: build.tar.gz
   ELECTRON_BUILD_LINUX: Agama-linux-x64
   ELECTRON_BUILD_WINDOWS: Agama-win32-x64
@@ -15,7 +15,13 @@ variables:
   AGAMA_WINDOWS: ${ELECTRON_BUILD_WINDOWS}-v${AGAMA_VERSION}-beta.zip
   AGAMA_MACOS: Agama-MacOS-v${AGAMA_VERSION}-beta
   GIT_SUBMODULE_STRATEGY: recursive
-  POST_COMMENT: "$\n Agama Branch and Commit: ${CI_COMMIT_REF_NAME} $\n${CI_COMMIT_SHA} $\nMD5: "
+  POST_COMMENT: "Source: ${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}\n
+  Pipeline Trigger: ${CI_PIPELINE_SOURCE}\n
+  Commit: ${CI_COMMIT_SHA}$\n
+  Author:  ${GITLAB_USER_NAME} <${GITLAB_USER_EMAIL}>\n
+  ${CI_COMMIT_MESSAGE}"
+
+
 build:linux:
   image: asherd/agama-builder
   stage: build
@@ -45,6 +51,11 @@ build:linux:
   - npm run package-linux
   - cd build
   - tar -czf $AGAMA_LINUX $ELECTRON_BUILD_LINUX
+  - curl -F file=@"$AGAMA_LINUX"
+      -F channels="$AGAMA_POST_CHANNEL"
+      -F initial_comment="${POST_COMMENT}"
+      -H "${SLACK_BOT_AUTH}"
+      "https://slack.com/api/files.upload"
   - mv $AGAMA_LINUX ..
   artifacts:
     paths: [$AGAMA_LINUX]
@@ -72,6 +83,11 @@ build:windows:
   - mkdir -p assets/bin/
   - unzip -qq $VERUS_CLI_WINDOWS -d assets/bin/
   - rm $VERUS_CLI_WINDOWS
+  - curl -F file=@"$AGAMA_WINDOWS"
+      -F channels="$AGAMA_POST_CHANNEL"
+      -F initial_comment="${POST_COMMENT}"
+      -H "${SLACK_BOT_AUTH}"
+      "https://slack.com/api/files.upload"
   - mv assets/bin/verus-cli assets/bin/win64
   script:
   - npm install electron-packager -g
@@ -102,6 +118,11 @@ build:mac:
   - mkdir -p assets/bin/
   - tar -xzf $VERUS_CLI_MACOS --directory assets/bin/
   - rm $VERUS_CLI_MACOS
+  - curl -F file=@"$AGAMA_MACOS.dmg"
+      -F channels="$AGAMA_POST_CHANNEL"
+      -F initial_comment="${POST_COMMENT}"
+      -H "${SLACK_BOT_AUTH}"
+      "https://slack.com/api/files.upload"
   - mv assets/bin/verus-cli assets/bin/osx
   script:
   - npm install
@@ -120,26 +141,7 @@ deploy:
   - build:linux
   - build:windows
   - build:mac
-  before_script:
-  - export AGAMA_LINUX_MD5=$(md5sum $AGAMA_LINUX | cut -d " " -f 1)
-  - export AGAMA_WINDOWS_MD5=$(md5sum $AGAMA_WINDOWS | cut -d " " -f 1)
-  - export AGAMA_MACOS_MD5=$(md5sum $AGAMA_MACOS.dmg | cut -d " " -f 1)
   script:
-  - curl -F file=@"$AGAMA_LINUX"
-      -F channels="$AGAMA_POST_CHANNEL"
-      -F initial_comment="${POST_COMMENT} $AGAMA_LINUX_MD5"
-      -H "${SLACK_BOT_AUTH}"
-      "https://slack.com/api/files.upload"
-  - curl -F file=@"$AGAMA_WINDOWS"
-      -F channels="$AGAMA_POST_CHANNEL"
-      -F initial_comment="${POST_COMMENT} $AGAMA_WINDOWS_MD5"
-      -H "${SLACK_BOT_AUTH}"
-      "https://slack.com/api/files.upload"
-  - curl -F file=@"$AGAMA_MACOS.dmg"
-      -F channels="$AGAMA_POST_CHANNEL"
-      -F initial_comment="${POST_COMMENT} $AGAMA_MACOS_MD5"
-      -H "${SLACK_BOT_AUTH}"
-      "https://slack.com/api/files.upload"
   - mkdir -p $CI_COMMIT_REF_NAME/Windows
   - mkdir -p $CI_COMMIT_REF_NAME/Linux
   - mkdir -p $CI_COMMIT_REF_NAME/MacOS
diff --git a/package-lock.json b/package-lock.json
index 402462f6a..b3aabe549 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
 {
   "name": "agama-app",
-  "version": "0.3.13",
+  "version": "0.3.19",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
diff --git a/package.json b/package.json
index ddb2706a8..ada97d70e 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
 {
   "name": "agama-app",
   "productName": "Agama",
-  "version": "0.3.13",
+  "version": "0.3.19",
   "description": "Agama Wallet Desktop App",
   "main": "main.js",
   "scripts": {
diff --git a/version b/version
index feaf9d408..34d2d8b0d 100644
--- a/version
+++ b/version
@@ -1,5 +1,5 @@
-version=0.3.13c
+version=0.3.19
 type=beta
-minversion=0.3.13c
+minversion=0.3.19
 
 
diff --git a/version_build b/version_build
index 154add88c..383cbdf9b 100644
--- a/version_build
+++ b/version_build
@@ -1,3 +1,3 @@
-0.3.13c-beta
+0.3.19-beta
 
 

From 324ad9981db3d4b08714623102e96aaad17af16d Mon Sep 17 00:00:00 2001
From: Asher Dawes <Asher.dawes@gmail.com>
Date: Sun, 7 Oct 2018 21:01:11 -0700
Subject: [PATCH 03/13] Correcting Slack post

---
 .gitlab-ci.yml | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ed0053bfe..8171e3c62 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -118,17 +118,17 @@ build:mac:
   - mkdir -p assets/bin/
   - tar -xzf $VERUS_CLI_MACOS --directory assets/bin/
   - rm $VERUS_CLI_MACOS
-  - curl -F file=@"$AGAMA_MACOS.dmg"
-      -F channels="$AGAMA_POST_CHANNEL"
-      -F initial_comment="${POST_COMMENT}"
-      -H "${SLACK_BOT_AUTH}"
-      "https://slack.com/api/files.upload"
   - mv assets/bin/verus-cli assets/bin/osx
   script:
   - npm install
   - npm install electron-packager -g
   - npm run package-mac
   - npm run create-installer-mac
+  - curl -F file=@"$AGAMA_MACOS.dmg"
+      -F channels="$AGAMA_POST_CHANNEL"
+      -F initial_comment="${POST_COMMENT}"
+      -H "${SLACK_BOT_AUTH}"
+      "https://slack.com/api/files.upload"
   artifacts:
     paths: [$AGAMA_MACOS.dmg]
     expire_in: 1 week

From 54cc7ec5a4504ce96e63b0d543f2fdfe72fade28 Mon Sep 17 00:00:00 2001
From: Asher Dawes <Asher.dawes@gmail.com>
Date: Sun, 7 Oct 2018 21:03:20 -0700
Subject: [PATCH 04/13] Correcting Slack post

---
 .gitlab-ci.yml | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8171e3c62..1e90c6b36 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -83,12 +83,6 @@ build:windows:
   - mkdir -p assets/bin/
   - unzip -qq $VERUS_CLI_WINDOWS -d assets/bin/
   - rm $VERUS_CLI_WINDOWS
-  - curl -F file=@"$AGAMA_WINDOWS"
-      -F channels="$AGAMA_POST_CHANNEL"
-      -F initial_comment="${POST_COMMENT}"
-      -H "${SLACK_BOT_AUTH}"
-      "https://slack.com/api/files.upload"
-  - mv assets/bin/verus-cli assets/bin/win64
   script:
   - npm install electron-packager -g
   - npm install electron -g --unsafe-perm=true
@@ -96,6 +90,12 @@ build:windows:
   - npm run package-win
   - cd build
   - zip -r $AGAMA_WINDOWS $ELECTRON_BUILD_WINDOWS
+  - curl -F file=@"$AGAMA_WINDOWS"
+      -F channels="$AGAMA_POST_CHANNEL"
+      -F initial_comment="${POST_COMMENT}"
+      -H "${SLACK_BOT_AUTH}"
+      "https://slack.com/api/files.upload"
+  - mv assets/bin/verus-cli assets/bin/win64
   - mv $AGAMA_WINDOWS ..
   artifacts:
     paths: [$AGAMA_WINDOWS]

From a6c965c55564591d9aa464d8f4b14dbdbd2dfb0d Mon Sep 17 00:00:00 2001
From: Asher Dawes <Asher.dawes@gmail.com>
Date: Sun, 7 Oct 2018 21:27:33 -0700
Subject: [PATCH 05/13] CI fix

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1e90c6b36..23773b0fd 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -83,6 +83,7 @@ build:windows:
   - mkdir -p assets/bin/
   - unzip -qq $VERUS_CLI_WINDOWS -d assets/bin/
   - rm $VERUS_CLI_WINDOWS
+  - mv assets/bin/verus-cli assets/bin/win64
   script:
   - npm install electron-packager -g
   - npm install electron -g --unsafe-perm=true
@@ -95,7 +96,6 @@ build:windows:
       -F initial_comment="${POST_COMMENT}"
       -H "${SLACK_BOT_AUTH}"
       "https://slack.com/api/files.upload"
-  - mv assets/bin/verus-cli assets/bin/win64
   - mv $AGAMA_WINDOWS ..
   artifacts:
     paths: [$AGAMA_WINDOWS]

From 11050d83fe3f948017c378613d113503b5d3ff8b Mon Sep 17 00:00:00 2001
From: miketout <michaeltoutonghi@gmail.com>
Date: Tue, 9 Oct 2018 21:19:16 -0700
Subject: [PATCH 06/13] Add Sapling and Test Net support

---
 routes/shepherd/dashboardUpdate.js | 3 ++-
 routes/shepherd/electrum/keys.js   | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/routes/shepherd/dashboardUpdate.js b/routes/shepherd/dashboardUpdate.js
index 2b298e357..cd60eb7ec 100644
--- a/routes/shepherd/dashboardUpdate.js
+++ b/routes/shepherd/dashboardUpdate.js
@@ -100,7 +100,8 @@ module.exports = (shepherd) => {
 
                   if (isNewAddr &&
                       (allAddrArray[a].substring(0, 2) === 'zc' ||
-                      allAddrArray[a].substring(0, 2) === 'zt')) {
+                      allAddrArray[a].substring(0, 2) === 'zt' || 
+                      allAddrArray[a].substring(0, 2) === 'zs')) {
                     result[1][result[1].length] = allAddrArray[a];
                   } else {
                     result[0][result[0].length] = allAddrArray[a];
diff --git a/routes/shepherd/electrum/keys.js b/routes/shepherd/electrum/keys.js
index 10ebbf3b4..f7247fe51 100644
--- a/routes/shepherd/electrum/keys.js
+++ b/routes/shepherd/electrum/keys.js
@@ -151,6 +151,9 @@ module.exports = (shepherd) => {
     if (network === 'VRSC'){
       return true;
     }
+    if (network === 'VERUSTEST'){
+      return true;
+    }
     else {
     try {
       const _b58check = shepherd.isZcash(network.toLowerCase()) ? bitcoinZcash.address.fromBase58Check(address) : bitcoin.address.fromBase58Check(address);

From e936316cb61191a29b10cc01b31806cd65f5f18e Mon Sep 17 00:00:00 2001
From: miketout <michaeltoutonghi@gmail.com>
Date: Tue, 9 Oct 2018 22:45:43 -0700
Subject: [PATCH 07/13] Add option to autostart staking, but remove it as
 default

---
 routes/appConfig.js                 |  7 +++++++
 routes/shepherd/addCoinShortcuts.js | 31 ++++++++++++++++++++++++-----
 2 files changed, 33 insertions(+), 5 deletions(-)

diff --git a/routes/appConfig.js b/routes/appConfig.js
index cb2445ac0..46be86a0a 100644
--- a/routes/appConfig.js
+++ b/routes/appConfig.js
@@ -12,6 +12,7 @@ const appConfig = {
     experimentalFeatures: false,
     dataDir: '',
     autoStartVRSC: false,
+    autoStakeVRSC: false,
     dex: {
       walletUnlockTimeout: 3600,
     },
@@ -91,6 +92,12 @@ const appConfig = {
       displayName: 'Automatically start VerusCoin on launch in native mode',
       type: 'boolean',
     },
+    autoStakeVRSC: {
+      display: true,
+      initDisplay: true,
+      displayName: 'Automatically start staking VerusCoin when it is launched in native mode',
+      type: 'boolean',
+    },
     dataDir: {
       display: true,
       initDisplay: true,
diff --git a/routes/shepherd/addCoinShortcuts.js b/routes/shepherd/addCoinShortcuts.js
index a3364f993..a50b23188 100644
--- a/routes/shepherd/addCoinShortcuts.js
+++ b/routes/shepherd/addCoinShortcuts.js
@@ -102,7 +102,8 @@ module.exports = (shepherd) => {
 
       httpRequest();
     } else if (selection === 'VRSC') {
-      herdData = {
+      if (shepherd.appConfig.autoStakeVRSC) {
+        herdData = {
           'ac_name': 'VRSC',
           'ac_options': [
               '-ac_algo=verushash',
@@ -117,13 +118,33 @@ module.exports = (shepherd) => {
               '-ac_timeunlockfrom=129600',
               '-ac_timeunlockto=1180800',
               '-ac_veruspos=50',
-              '-gen',
-              '-genproclimit=0'
+              '-mint'
           ]
-      };
+        };
+      }
+      else {
+        herdData = {
+          'ac_name': 'VRSC',
+          'ac_options': [
+              '-ac_algo=verushash',
+              '-ac_cc=1',
+              '-ac_supply=0',
+              '-ac_eras=3',
+              '-ac_reward=0,38400000000,2400000000',
+              '-ac_halving=1,43200,1051920',
+              '-ac_decay=100000000,0,0',
+              '-ac_end=10080,226080,0',
+              '-ac_timelockgte=19200000000',
+              '-ac_timeunlockfrom=129600',
+              '-ac_timeunlockto=1180800',
+              '-ac_veruspos=50',
+          ]
+        };
+      }
+      
 
       httpRequest();
-  }  else {
+    }  else {
       const herdData = [{
         'ac_name': 'komodod',
         'ac_options': [

From 26b6ecf84f8402a4387612b9284096610dae25c9 Mon Sep 17 00:00:00 2001
From: michaelftout <toutonghi.michael@gmail.com>
Date: Wed, 10 Oct 2018 23:32:58 -0700
Subject: [PATCH 08/13] Added cheatcatching to config file

---
 routes/appConfig.js                 |  7 +++++++
 routes/shepherd/addCoinShortcuts.js | 32 +++++++++--------------------
 2 files changed, 17 insertions(+), 22 deletions(-)

diff --git a/routes/appConfig.js b/routes/appConfig.js
index 46be86a0a..78f1eb0b1 100644
--- a/routes/appConfig.js
+++ b/routes/appConfig.js
@@ -13,6 +13,7 @@ const appConfig = {
     dataDir: '',
     autoStartVRSC: false,
     autoStakeVRSC: false,
+    cheatCatcher: '',
     dex: {
       walletUnlockTimeout: 3600,
     },
@@ -98,6 +99,12 @@ const appConfig = {
       displayName: 'Automatically start staking VerusCoin when it is launched in native mode',
       type: 'boolean',
     },
+    cheatCatcher: {
+      display: true,
+      info: 'As part of the VerusCoin Something at Stake solution, you can enter a Verus sapling address in this field, so when you catch them, you get their staking reward. Dont forget to thank them ;)',
+      displayName: 'Your VRSC sapling address for receiving funds cheaters attempt to steal',
+      type: 'string',
+    },
     dataDir: {
       display: true,
       initDisplay: true,
diff --git a/routes/shepherd/addCoinShortcuts.js b/routes/shepherd/addCoinShortcuts.js
index a50b23188..ce562f76c 100644
--- a/routes/shepherd/addCoinShortcuts.js
+++ b/routes/shepherd/addCoinShortcuts.js
@@ -102,7 +102,6 @@ module.exports = (shepherd) => {
 
       httpRequest();
     } else if (selection === 'VRSC') {
-      if (shepherd.appConfig.autoStakeVRSC) {
         herdData = {
           'ac_name': 'VRSC',
           'ac_options': [
@@ -118,29 +117,18 @@ module.exports = (shepherd) => {
               '-ac_timeunlockfrom=129600',
               '-ac_timeunlockto=1180800',
               '-ac_veruspos=50',
-              '-mint'
           ]
         };
-      }
-      else {
-        herdData = {
-          'ac_name': 'VRSC',
-          'ac_options': [
-              '-ac_algo=verushash',
-              '-ac_cc=1',
-              '-ac_supply=0',
-              '-ac_eras=3',
-              '-ac_reward=0,38400000000,2400000000',
-              '-ac_halving=1,43200,1051920',
-              '-ac_decay=100000000,0,0',
-              '-ac_end=10080,226080,0',
-              '-ac_timelockgte=19200000000',
-              '-ac_timeunlockfrom=129600',
-              '-ac_timeunlockto=1180800',
-              '-ac_veruspos=50',
-          ]
-        };
-      }
+
+        //Checking for VRSC specific config commands 
+        if(shepherd.appConfig.autoStakeVRSC) {
+          herdData['ac_options'].push('-mint');
+          console.log('VRSC Staking set to default');
+        }
+        if(shepherd.appConfig.cheatCatcher.length === 78) {
+          herdData['ac_options'].push('-' + shepherd.appConfig.cheatCatcher);
+          console.log('Cheatcatching enabled at address ' + shepherd.appConfig.cheatCatcher);
+        }
       
 
       httpRequest();

From f74b6b55b14f43d772b964b200b61eecf4fc29d6 Mon Sep 17 00:00:00 2001
From: michaelftout <toutonghi.michael@gmail.com>
Date: Thu, 11 Oct 2018 01:27:24 -0700
Subject: [PATCH 09/13] Fixed cheatcatcher param

---
 routes/shepherd/addCoinShortcuts.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/routes/shepherd/addCoinShortcuts.js b/routes/shepherd/addCoinShortcuts.js
index ce562f76c..a22cfd1d2 100644
--- a/routes/shepherd/addCoinShortcuts.js
+++ b/routes/shepherd/addCoinShortcuts.js
@@ -126,7 +126,7 @@ module.exports = (shepherd) => {
           console.log('VRSC Staking set to default');
         }
         if(shepherd.appConfig.cheatCatcher.length === 78) {
-          herdData['ac_options'].push('-' + shepherd.appConfig.cheatCatcher);
+          herdData['ac_options'].push('-cheatcatcher=' + shepherd.appConfig.cheatCatcher);
           console.log('Cheatcatching enabled at address ' + shepherd.appConfig.cheatCatcher);
         }
       

From d6bed80e8420c88a72135189d2d5df6ab1d45068 Mon Sep 17 00:00:00 2001
From: Asher Dawes <Asher.dawes@gmail.com>
Date: Fri, 12 Oct 2018 23:19:57 -0700
Subject: [PATCH 10/13] Updating version to 0.4.0

---
 .gitlab-ci.yml | 2 +-
 package.json   | 2 +-
 version        | 4 ++--
 version_build  | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 23773b0fd..d57cbb924 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,7 +6,7 @@ variables:
   DOCKER_DRIVER: overlay2
   DEFAULT_CLI_BRANCH: dev
   DEFAULT_EASYDEXGUI_BRANCH: dev
-  AGAMA_VERSION: 0.3.19
+  AGAMA_VERSION: 0.4.0
   EASYDEX_GUI_BUILD: build.tar.gz
   ELECTRON_BUILD_LINUX: Agama-linux-x64
   ELECTRON_BUILD_WINDOWS: Agama-win32-x64
diff --git a/package.json b/package.json
index ada97d70e..e4eda4b05 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
 {
   "name": "agama-app",
   "productName": "Agama",
-  "version": "0.3.19",
+  "version": "0.4.0",
   "description": "Agama Wallet Desktop App",
   "main": "main.js",
   "scripts": {
diff --git a/version b/version
index 34d2d8b0d..4b76564a5 100644
--- a/version
+++ b/version
@@ -1,5 +1,5 @@
-version=0.3.19
+version=0.4.0
 type=beta
-minversion=0.3.19
+minversion=0.4.0
 
 
diff --git a/version_build b/version_build
index 383cbdf9b..67c334ebf 100644
--- a/version_build
+++ b/version_build
@@ -1,3 +1,3 @@
-0.3.19-beta
+0.4.0-beta
 
 

From 3180074a1c38ffdb18f54b65973829ae6430b989 Mon Sep 17 00:00:00 2001
From: Asher Dawes <asher.dawes@gmail.com>
Date: Fri, 12 Oct 2018 23:23:15 -0700
Subject: [PATCH 11/13] Updating CI config and updating version to 0.3.4 (#75)

---
 .gitlab-ci.yml    | 44 +++++++++++++++++++++++---------------------
 package-lock.json |  2 +-
 package.json      |  2 +-
 version           |  4 ++--
 version_build     |  2 +-
 5 files changed, 28 insertions(+), 26 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 523844872..d57cbb924 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,7 +6,7 @@ variables:
   DOCKER_DRIVER: overlay2
   DEFAULT_CLI_BRANCH: dev
   DEFAULT_EASYDEXGUI_BRANCH: dev
-  AGAMA_VERSION: 0.3.13c
+  AGAMA_VERSION: 0.4.0
   EASYDEX_GUI_BUILD: build.tar.gz
   ELECTRON_BUILD_LINUX: Agama-linux-x64
   ELECTRON_BUILD_WINDOWS: Agama-win32-x64
@@ -15,7 +15,13 @@ variables:
   AGAMA_WINDOWS: ${ELECTRON_BUILD_WINDOWS}-v${AGAMA_VERSION}-beta.zip
   AGAMA_MACOS: Agama-MacOS-v${AGAMA_VERSION}-beta
   GIT_SUBMODULE_STRATEGY: recursive
-  POST_COMMENT: "$\n Agama Branch and Commit: ${CI_COMMIT_REF_NAME} $\n${CI_COMMIT_SHA} $\nMD5: "
+  POST_COMMENT: "Source: ${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}\n
+  Pipeline Trigger: ${CI_PIPELINE_SOURCE}\n
+  Commit: ${CI_COMMIT_SHA}$\n
+  Author:  ${GITLAB_USER_NAME} <${GITLAB_USER_EMAIL}>\n
+  ${CI_COMMIT_MESSAGE}"
+
+
 build:linux:
   image: asherd/agama-builder
   stage: build
@@ -45,6 +51,11 @@ build:linux:
   - npm run package-linux
   - cd build
   - tar -czf $AGAMA_LINUX $ELECTRON_BUILD_LINUX
+  - curl -F file=@"$AGAMA_LINUX"
+      -F channels="$AGAMA_POST_CHANNEL"
+      -F initial_comment="${POST_COMMENT}"
+      -H "${SLACK_BOT_AUTH}"
+      "https://slack.com/api/files.upload"
   - mv $AGAMA_LINUX ..
   artifacts:
     paths: [$AGAMA_LINUX]
@@ -80,6 +91,11 @@ build:windows:
   - npm run package-win
   - cd build
   - zip -r $AGAMA_WINDOWS $ELECTRON_BUILD_WINDOWS
+  - curl -F file=@"$AGAMA_WINDOWS"
+      -F channels="$AGAMA_POST_CHANNEL"
+      -F initial_comment="${POST_COMMENT}"
+      -H "${SLACK_BOT_AUTH}"
+      "https://slack.com/api/files.upload"
   - mv $AGAMA_WINDOWS ..
   artifacts:
     paths: [$AGAMA_WINDOWS]
@@ -108,6 +124,11 @@ build:mac:
   - npm install electron-packager -g
   - npm run package-mac
   - npm run create-installer-mac
+  - curl -F file=@"$AGAMA_MACOS.dmg"
+      -F channels="$AGAMA_POST_CHANNEL"
+      -F initial_comment="${POST_COMMENT}"
+      -H "${SLACK_BOT_AUTH}"
+      "https://slack.com/api/files.upload"
   artifacts:
     paths: [$AGAMA_MACOS.dmg]
     expire_in: 1 week
@@ -120,26 +141,7 @@ deploy:
   - build:linux
   - build:windows
   - build:mac
-  before_script:
-  - export AGAMA_LINUX_MD5=$(md5sum $AGAMA_LINUX | cut -d " " -f 1)
-  - export AGAMA_WINDOWS_MD5=$(md5sum $AGAMA_WINDOWS | cut -d " " -f 1)
-  - export AGAMA_MACOS_MD5=$(md5sum $AGAMA_MACOS.dmg | cut -d " " -f 1)
   script:
-  - curl -F file=@"$AGAMA_LINUX"
-      -F channels="$AGAMA_POST_CHANNEL"
-      -F initial_comment="${POST_COMMENT} $AGAMA_LINUX_MD5"
-      -H "${SLACK_BOT_AUTH}"
-      "https://slack.com/api/files.upload"
-  - curl -F file=@"$AGAMA_WINDOWS"
-      -F channels="$AGAMA_POST_CHANNEL"
-      -F initial_comment="${POST_COMMENT} $AGAMA_WINDOWS_MD5"
-      -H "${SLACK_BOT_AUTH}"
-      "https://slack.com/api/files.upload"
-  - curl -F file=@"$AGAMA_MACOS.dmg"
-      -F channels="$AGAMA_POST_CHANNEL"
-      -F initial_comment="${POST_COMMENT} $AGAMA_MACOS_MD5"
-      -H "${SLACK_BOT_AUTH}"
-      "https://slack.com/api/files.upload"
   - mkdir -p $CI_COMMIT_REF_NAME/Windows
   - mkdir -p $CI_COMMIT_REF_NAME/Linux
   - mkdir -p $CI_COMMIT_REF_NAME/MacOS
diff --git a/package-lock.json b/package-lock.json
index 402462f6a..b3aabe549 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
 {
   "name": "agama-app",
-  "version": "0.3.13",
+  "version": "0.3.19",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
diff --git a/package.json b/package.json
index ddb2706a8..e4eda4b05 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
 {
   "name": "agama-app",
   "productName": "Agama",
-  "version": "0.3.13",
+  "version": "0.4.0",
   "description": "Agama Wallet Desktop App",
   "main": "main.js",
   "scripts": {
diff --git a/version b/version
index feaf9d408..4b76564a5 100644
--- a/version
+++ b/version
@@ -1,5 +1,5 @@
-version=0.3.13c
+version=0.4.0
 type=beta
-minversion=0.3.13c
+minversion=0.4.0
 
 
diff --git a/version_build b/version_build
index 154add88c..67c334ebf 100644
--- a/version_build
+++ b/version_build
@@ -1,3 +1,3 @@
-0.3.13c-beta
+0.4.0-beta
 
 

From 979cedee43df1c68a4c11aae605ef7d7f23b1ba1 Mon Sep 17 00:00:00 2001
From: michaelftout <toutonghi.michael@gmail.com>
Date: Sat, 13 Oct 2018 22:52:54 -0700
Subject: [PATCH 12/13] Updated ZCash Params

---
 routes/shepherd/downloadZcparams.js | 28 ++++++++++++++++++++++++----
 1 file changed, 24 insertions(+), 4 deletions(-)

diff --git a/routes/shepherd/downloadZcparams.js b/routes/shepherd/downloadZcparams.js
index 4236952e5..5e421a059 100644
--- a/routes/shepherd/downloadZcparams.js
+++ b/routes/shepherd/downloadZcparams.js
@@ -4,6 +4,14 @@ const Promise = require('bluebird');
 
 module.exports = (shepherd) => {
   shepherd.zcashParamsDownloadLinks = {
+    'z.cash': {
+      proving: 'https://z.cash/downloads/sprout-proving.key',
+      verifying: 'https://z.cash/downloads/sprout-verifying.key',
+      spend: 'https://z.cash/downloads/sapling-spend.params',
+      output: 'https://z.cash/downloads/sapling-output.params',
+      groth16: 'https://z.cash/downloads/sprout-groth16.params'
+    },
+    /*
     'agama.komodoplatform.com': {
       proving: 'https://agama.komodoplatform.com/file/supernet/sprout-proving.key',
       verifying: 'https://agama.komodoplatform.com/file/supernet/sprout-verifying.key',
@@ -16,6 +24,7 @@ module.exports = (shepherd) => {
       proving: 'https://zcash.dl.mercerweiss.com/sprout-proving.key',
       verifying: 'https://zcash.dl.mercerweiss.com/sprout-verifying.key',
     },
+    */
   };
 
   shepherd.zcashParamsExist = () => {
@@ -25,12 +34,18 @@ module.exports = (shepherd) => {
       provingKeySize: false,
       verifyingKey: _fs.existsSync(`${shepherd.zcashParamsDir}/sprout-verifying.key`),
       verifyingKeySize: false,
+      spend: _fs.existsSync(`${shepherd.zcashParamsDir}/sapling-spend.params`),
+      output: _fs.existsSync(`${shepherd.zcashParamsDir}/sapling-output.params`),
+      groth16: _fs.existsSync(`${shepherd.zcashParamsDir}/sprout-groth16.params`),
       errors: false,
     };
 
     if (_checkList.rootDir &&
-        _checkList.provingKey ||
-        _checkList.verifyingKey) {
+        _checkList.provingKey &&
+        _checkList.verifyingKey &&
+        _checkList.spend &&
+        _checkList.output &&
+        _checkList.groth16) {
       // verify each key size
       const _provingKeySize = _checkList.provingKey ? fs.lstatSync(`${shepherd.zcashParamsDir}/sprout-proving.key`) : 0;
       const _verifyingKeySize = _checkList.verifyingKey ? fs.lstatSync(`${shepherd.zcashParamsDir}/sprout-verifying.key`) : 0;
@@ -51,7 +66,10 @@ module.exports = (shepherd) => {
         !_checkList.provingKey ||
         !_checkList.verifyingKey ||
         !_checkList.provingKeySize ||
-        !_checkList.verifyingKeySize) {
+        !_checkList.verifyingKeySize ||
+        !_checkList.spend ||
+        !_checkList.output ||
+        !_checkList.groth16) {
       _checkList.errors = true;
     }
 
@@ -86,7 +104,9 @@ module.exports = (shepherd) => {
       for (let key in shepherd.zcashParamsDownloadLinks[dlOption]) {
         shepherd.downloadFile({
           remoteFile: shepherd.zcashParamsDownloadLinks[dlOption][key],
-          localFile: `${dlLocation}/sprout-${key}.key`,
+          localFile: key === 'spend' || key === 'output' ? 
+          `${dlLocation}/sapling-${key}.params` : 
+          (key === 'groth16' ? `${dlLocation}/sprout-${key}.params` : `${dlLocation}/sprout-${key}.key`),
           onProgress: (received, total) => {
             const percentage = (received * 100) / total;
 

From 5bfab78c4f13c6e0e872d501fc2b61aef5c9fb3f Mon Sep 17 00:00:00 2001
From: michaelftout <toutonghi.michael@gmail.com>
Date: Sun, 14 Oct 2018 22:42:12 -0700
Subject: [PATCH 13/13] Fixed Zcash params modal

---
 routes/shepherd/downloadZcparams.js | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/routes/shepherd/downloadZcparams.js b/routes/shepherd/downloadZcparams.js
index 5e421a059..dd6ef0555 100644
--- a/routes/shepherd/downloadZcparams.js
+++ b/routes/shepherd/downloadZcparams.js
@@ -11,20 +11,6 @@ module.exports = (shepherd) => {
       output: 'https://z.cash/downloads/sapling-output.params',
       groth16: 'https://z.cash/downloads/sprout-groth16.params'
     },
-    /*
-    'agama.komodoplatform.com': {
-      proving: 'https://agama.komodoplatform.com/file/supernet/sprout-proving.key',
-      verifying: 'https://agama.komodoplatform.com/file/supernet/sprout-verifying.key',
-    },
-    'agama-yq0ysrdtr.stackpathdns.com': {
-      proving: 'http://agama-yq0ysrdtr.stackpathdns.com/file/supernet/sprout-proving.key',
-      verifying: 'http://agama-yq0ysrdtr.stackpathdns.com/file/supernet/sprout-verifying.key',
-    },
-    'zcash.dl.mercerweiss.com': {
-      proving: 'https://zcash.dl.mercerweiss.com/sprout-proving.key',
-      verifying: 'https://zcash.dl.mercerweiss.com/sprout-verifying.key',
-    },
-    */
   };
 
   shepherd.zcashParamsExist = () => {