22 Commits

Author SHA1 Message Date
  Duke Leto 36b4bad7dd Polish comes from the cities; wisdom from the desert. 2 weeks ago
  Duke Leto 3a9f098caa New params 2 weeks ago
  Duke Leto 4be49d607a update hush-cli 2 weeks ago
  Duke Leto e34b5b0d3b Merge pull request 'minor UI updates & minor build.sh change' (#3) from jahway603/SilentDragon:dev into dev 2 weeks ago
  jahway603 f54eb22d74 added qmake check in build.sh 2 weeks ago
  jahway603 a5b204079b swapped About and Help on menu toolbar & updated logo to reflect SD instead of SDL 2 weeks ago
  Duke Leto 892d0339f6 updates 2 weeks ago
  Duke Leto 5d6cc9ff48 We do not download junk like other coins 2 weeks ago
  Duke Leto 1a684ddee6 Fuck github some more 2 weeks ago
  Duke Leto 8265334b64 Disable checking cunty github for updates 2 weeks ago
  Duke Leto b7ac09bd71 2021 2 weeks ago
  Duke Leto b4cf171515 ch-ch-changes 2 weeks ago
  Duke Leto dce8f2838c bump dat version 1 month ago
  Djozeff 317d8d52aa Update 'README.md' 1 month ago
  Djozeff cf16139f80 Update 'README.md' 1 month ago
  Djozeff 2f2b0ab702 Update 'README.md' 1 month ago
  Duke Leto 478479e70a Replace github links with gitea links 2 months ago
  Duke Leto a339b237e8 No more github badges 2 months ago
  Duke Leto 4190aa7405 Update support links 2 months ago
  Duke Leto 50eae156d7
Merge pull request #208 from gilardh/master 3 months ago
  gilardh a4db8e47b1 Put all theme name to 'unfinished' 3 months ago
  Duke Leto 96fe5aa1c1 Make older systems happy by making sure shared_ptr is available 3 months ago
99 changed files with 4092 additions and 3786 deletions
Split View
  1. +5
    -0
      AUTHORS
  2. +10
    -12
      README.md
  3. +7
    -1
      build.sh
  4. +0
    -6
      docs/index.html
  5. +7
    -5
      hush-cli
  6. +1
    -1
      res/Info.plist
  7. +0
    -13
      res/SIGNATURES_README
  8. +1
    -1
      res/libsodium/buildlibsodium.sh
  9. +206
    -211
      res/silentdragon_bg.ts
  10. BIN
      res/silentdragon_de.qm
  11. +233
    -210
      res/silentdragon_de.ts
  12. BIN
      res/silentdragon_es.qm
  13. +221
    -210
      res/silentdragon_es.ts
  14. BIN
      res/silentdragon_fi.qm
  15. +228
    -209
      res/silentdragon_fi.ts
  16. BIN
      res/silentdragon_fil.qm
  17. +232
    -213
      res/silentdragon_fil.ts
  18. BIN
      res/silentdragon_fr.qm
  19. +233
    -214
      res/silentdragon_fr.ts
  20. BIN
      res/silentdragon_hr.qm
  21. +232
    -213
      res/silentdragon_hr.ts
  22. BIN
      res/silentdragon_id.qm
  23. +230
    -215
      res/silentdragon_id.ts
  24. BIN
      res/silentdragon_it.qm
  25. +221
    -210
      res/silentdragon_it.ts
  26. BIN
      res/silentdragon_nl.qm
  27. +228
    -209
      res/silentdragon_nl.ts
  28. BIN
      res/silentdragon_pt.qm
  29. +221
    -210
      res/silentdragon_pt.ts
  30. BIN
      res/silentdragon_ro.qm
  31. +232
    -213
      res/silentdragon_ro.ts
  32. BIN
      res/silentdragon_ru.qm
  33. +228
    -213
      res/silentdragon_ru.ts
  34. BIN
      res/silentdragon_sr.qm
  35. +232
    -213
      res/silentdragon_sr.ts
  36. +4
    -4
      res/silentdragon_template.ts
  37. BIN
      res/silentdragon_tr.qm
  38. +229
    -210
      res/silentdragon_tr.ts
  39. BIN
      res/silentdragon_uk.qm
  40. +228
    -213
      res/silentdragon_uk.ts
  41. BIN
      res/silentdragon_zh.qm
  42. +225
    -210
      res/silentdragon_zh.ts
  43. BIN
      res/zcashdlogo.gif
  44. +1
    -1
      run-after-build.sh
  45. +2
    -4
      silentdragon.pro
  46. +2
    -1
      src/3rdparty/sodium.h
  47. +5
    -5
      src/about.ui
  48. +2
    -0
      src/addressbook.cpp
  49. +3
    -1
      src/addressbook.h
  50. +3
    -1
      src/addresscombo.cpp
  51. +2
    -0
      src/addresscombo.h
  52. +2
    -0
      src/balancestablemodel.cpp
  53. +3
    -1
      src/balancestablemodel.h
  54. +25
    -41
      src/connection.cpp
  55. +5
    -3
      src/connection.h
  56. +3
    -1
      src/fillediconlabel.cpp
  57. +3
    -1
      src/fillediconlabel.h
  58. +3
    -1
      src/logger.cpp
  59. +3
    -1
      src/logger.h
  60. +2
    -4
      src/main.cpp
  61. +12
    -19
      src/mainwindow.cpp
  62. +4
    -1
      src/mainwindow.h
  63. +9
    -7
      src/mainwindow.ui
  64. +3
    -1
      src/memoedit.cpp
  65. +3
    -1
      src/memoedit.h
  66. +2
    -0
      src/mobileappconnector.cpp
  67. +2
    -0
      src/mobileappconnector.h
  68. +2
    -0
      src/precompiled.h
  69. +3
    -1
      src/qrcodelabel.cpp
  70. +2
    -0
      src/qrcodelabel.h
  71. +3
    -1
      src/recurring.cpp
  72. +3
    -1
      src/recurring.h
  73. +2
    -0
      src/requestdialog.cpp
  74. +2
    -0
      src/requestdialog.h
  75. +18
    -14
      src/rpc.cpp
  76. +5
    -3
      src/rpc.h
  77. +1
    -1
      src/scripts/dotranslations.sh
  78. +1
    -1
      src/scripts/make-binary-tarball.sh
  79. +1
    -1
      src/scripts/make-deb.sh
  80. +1
    -1
      src/scripts/make-only-deb.sh
  81. +2
    -0
      src/scripts/mkmacdmg.sh
  82. +1
    -1
      src/scripts/mkrelease.sh
  83. +2
    -0
      src/scripts/signbinaries.sh
  84. +4
    -3
      src/sendtab.cpp
  85. +2
    -0
      src/senttxstore.cpp
  86. +2
    -0
      src/senttxstore.h
  87. +3
    -3
      src/settings.cpp
  88. +2
    -1
      src/settings.h
  89. +6
    -6
      src/settings.ui
  90. +2
    -0
      src/txtablemodel.cpp
  91. +2
    -0
      src/txtablemodel.h
  92. +2
    -0
      src/validateaddress.cpp
  93. +2
    -0
      src/validateaddress.h
  94. +1
    -1
      src/version.h
  95. +2
    -0
      src/viewalladdresses.cpp
  96. +3
    -1
      src/viewalladdresses.h
  97. +9
    -7
      src/websockets.cpp
  98. +2
    -4
      src/websockets.h
  99. +1
    -1
      win-build.sh

+ 5
- 0
AUTHORS

@ -0,0 +1,5 @@
# The Hush Developers
Duke Leto https://git.hush.is/duke https://github.com/leto
Jane Mercer https://git.hush.is/radix42 https://github.com/radix42

+ 10
- 12
README.md

@ -1,7 +1,4 @@
# SilentDragon
[![GitHub license](https://img.shields.io/badge/License-GPL%20v3-yellow.svg)](https://github.com/MyHush/SilentDragon/blob/master/LICENSE)
[![GitHub version](https://badge.fury.io/gh/MyHush%2FSilentDragon.svg)](https://badge.fury.io/gh/MyHush%2FSilentDragon)
[![Github All Releases](https://img.shields.io/github/downloads/MyHush/SilentDragon/total.svg)](https://img.shields.io/github/downloads/MyHush/SilentDragon/total.svg)
<p align="left">
<a href="https://twitter.com/MyHushTeam">
@ -29,20 +26,21 @@ SilentDragon contacts a few different external websites to get various
bits of data.
* coingecko.com for price data API
* explorer.myhush.org for explorer links
* explorer.hush.is for explorer links
* dexstats.info for address utilities
* wormhole.myhush.org for Wormhole services
* wormhole.hush.is for Wormhole services
This means your IP address is known to these servers. Enable Tor setting
in SilentDragon to prevent this, or better yet, use TAILS: https://tails.boum.org/
# Installation
Go to the releases page and grab the latest installers or binary. https://github.com/MyHush/SilentDragon/releases
Go to the [releases page](https://git.hush.is/hush/SilentDragon/releases) and grab the latest installers or binary.
## hushd
SilentDragon needs a Hush full node running [hushd](https://github.com/MyHush/hush3/). If you already have a hushd node running, SilentDragon will connect to it.
SilentDragon needs a Hush full node running [hushd](https://git.hush.is/hush/hush3/). If you already have a hushd node running, SilentDragon will connect to it.
If you don't have one, SilentDragon will start its embedded hushd node.
@ -64,7 +62,7 @@ hushd, or compile hushd as well.
```
sudo apt-get -y install qt5-default qt5-qmake libqt5websockets5-dev qtcreator
git clone https://github.com/MyHush/SilentDragon.git
git clone https://git.hush.is/hush/SilentDragon
cd SilentDragon
./build.sh linguist # compile translations
./build.sh
@ -75,7 +73,7 @@ cd SilentDragon
```
sudo pacman -S qt5-base qt5-tools qtcreator qt5-websockets rust
git clone https://github.com/MyHush/SilentDragon.git
git clone https://git.hush.is/hush/SilentDragon
cd SilentDragon
./build.sh linguist # compile translations
./build.sh release
@ -87,7 +85,7 @@ You need Visual Studio 2017 (The free C++ Community Edition works just fine).
From the VS Tools command prompt
```
git clone https://github.com/MyHush/SilentDragon.git
git clone https://git.hush.is/hush/SilentDragon
cd SilentDragon
c:\Qt5\bin\qmake.exe silentdragon.pro -spec win32-msvc CONFIG+=debug
nmake
@ -105,7 +103,7 @@ c:\Qt5\bin\qmake.exe silentdragon.pro -tp vc CONFIG+=debug
You need to install the Xcode app or the Xcode command line tools first, and then install Qt.
```
git clone https://github.com/MyHush/SilentDragon.git
git clone https://git.hush.is/hush/SilentDragon
cd SilentDragon
qmake silentdragon.pro CONFIG+=debug
make
@ -129,5 +127,5 @@ The above assumes silentdragon and hush3 git repos are in the same directory. Fi
### Support
For support or other questions, join us on [Discord](https://myhush.org/discord), or tweet at [@MyHushTeam](https://twitter.com/MyHushTeam), or toot at our [Mastodon](https://fosstodon.org/@myhushteam) or join [Telegram](http://myhush.org/telegram) or [file an issue](https://github.com/MyHush/SilentDragon/issues).
For support or other questions, join us on [Telegram](https://hush.is/telegram), or tweet at [@MyHushTeam](https://twitter.com/MyHushTeam), or toot at our [Mastodon](https://fosstodon.org/@myhushteam) or join [Telegram Support](https://hush.is/telegram_support) or [file an issue](https://git.hush.is/hush/SilentDragon/issues).

+ 7
- 1
build.sh

@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2019-2020 The Hush Developers
# Copyright 2018-2021 The Hush Developers
# Released under the GPLv3
set -e
@ -15,6 +15,12 @@ else
JOBS=1
fi
# Check if qmake is installed on system and exits if it is not
if ! [ -x "$(command -v qmake)" ]; then
echo 'Error: qmake is not installed. Install qmake and try again.' >&2
exit 1
fi
VERSION=$(cat src/version.h |cut -d\" -f2)
echo "Compiling SilentDragon $VERSION with $JOBS threads..."
CONF=silentdragon.pro

+ 0
- 6
docs/index.html

@ -1,6 +0,0 @@
<html>
<head></head>
<body>
Hello World
</body>
</html>

+ 7
- 5
hush-cli

@ -1,5 +1,6 @@
#!/bin/bash
# Copyright (c) 2019 Hush developers
# Copyright (c) 2016-2020 The Hush developers
# Released under the GPLv3
# set working directory to the location of this script
# readlink -f does not always exist
@ -12,10 +13,11 @@ NAME=HUSH3
CLI=${KOMODOCLI:-./komodo-cli}
if [ -f $CLI ]; then
$CLI -ac_name=$NAME "[email protected]"
$CLI -ac_name=$NAME "[email protected]"
else
# We prefix our binary when installed
# system wide on Debain system, to prevent clashes
CLI=hush-komodo-cli
# We prefix our binary when installed
# system wide on Debain systems, to prevent clashes,
# because we are classy like that. Fuck jl777, The KYC Traitor.
CLI=hush-komodo-cli
$CLI -ac_name=$NAME "[email protected]"
fi

+ 1
- 1
res/Info.plist

@ -9,7 +9,7 @@
<key>CFBundleIconFile</key>
<string>logo.icns</string>
<key>CFBundleIdentifier</key>
<string>com.myhush.silentdragon</string>
<string>com.hush.silentdragon</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>

+ 0
- 13
res/SIGNATURES_README

@ -1,13 +0,0 @@
This directory contains the hashes and signatures for SilentDargon
Verify the hashes by running:
sha256sum -c sha256sum-vX.Y.Z.txt
Verify signatures:
1. First, import the public key (Available on GitHub
at https://github.com/ZcashFoundation/zecwallet/blob/master/public_key.asc)
gpg --import public_key.asc
2. Verify signature
gpg --verify <filename.sig> <downloaded-filename-to-verify>

+ 1
- 1
res/libsodium/buildlibsodium.sh

@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2019-2020 The Hush developers
# Copyright (c) 2019-2021 The Hush developers
# Released under the GPLv3
VERSION=1.0.18

+ 206
- 211
res/silentdragon_bg.ts
File diff suppressed because it is too large
View File


BIN
res/silentdragon_de.qm


+ 233
- 210
res/silentdragon_de.ts
File diff suppressed because it is too large
View File


BIN
res/silentdragon_es.qm


+ 221
- 210
res/silentdragon_es.ts
File diff suppressed because it is too large
View File


BIN
res/silentdragon_fi.qm


+ 228
- 209
res/silentdragon_fi.ts
File diff suppressed because it is too large
View File


BIN
res/silentdragon_fil.qm


+ 232
- 213
res/silentdragon_fil.ts
File diff suppressed because it is too large
View File


BIN
res/silentdragon_fr.qm


+ 233
- 214
res/silentdragon_fr.ts
File diff suppressed because it is too large
View File


BIN
res/silentdragon_hr.qm


+ 232
- 213
res/silentdragon_hr.ts
File diff suppressed because it is too large
View File


BIN
res/silentdragon_id.qm


+ 230
- 215
res/silentdragon_id.ts
File diff suppressed because it is too large
View File


BIN
res/silentdragon_it.qm


+ 221
- 210
res/silentdragon_it.ts
File diff suppressed because it is too large
View File


BIN
res/silentdragon_nl.qm


+ 228
- 209
res/silentdragon_nl.ts
File diff suppressed because it is too large
View File


BIN
res/silentdragon_pt.qm


+ 221
- 210
res/silentdragon_pt.ts
File diff suppressed because it is too large
View File


BIN
res/silentdragon_ro.qm


+ 232
- 213
res/silentdragon_ro.ts
File diff suppressed because it is too large
View File


BIN
res/silentdragon_ru.qm


+ 228
- 213
res/silentdragon_ru.ts
File diff suppressed because it is too large
View File


BIN
res/silentdragon_sr.qm


+ 232
- 213
res/silentdragon_sr.ts
File diff suppressed because it is too large
View File


+ 4
- 4
res/silentdragon_template.ts

@ -424,7 +424,7 @@
</message>
<message>
<location filename="../src/mainwindow.ui" line="1453"/>
<source>&amp;Hush Discord</source>
<source>&amp;Hush Telegram</source>
<translation type="unfinished"></translation>
</message>
<message>
@ -434,7 +434,7 @@
</message>
<message>
<location filename="../src/mainwindow.ui" line="1463"/>
<source>Check github.com for &amp;updates</source>
<source>Check git for &amp;updates</source>
<translation type="unfinished"></translation>
</message>
<message>
@ -1519,7 +1519,7 @@ Would you like to visit the releases page?
</message>
<message>
<location filename="../src/settings.ui" line="230"/>
<source>Check github for updates at startup</source>
<source>Check git for updates at startup</source>
<translation type="unfinished"></translation>
</message>
<message>
@ -1564,7 +1564,7 @@ Would you like to visit the releases page?
</message>
<message>
<location filename="../src/settings.ui" line="312"/>
<source>Connect to github on startup to check for updates</source>
<source>Connect to git on startup to check for updates</source>
<translation type="unfinished"></translation>
</message>
<message>

BIN
res/silentdragon_tr.qm


+ 229
- 210
res/silentdragon_tr.ts
File diff suppressed because it is too large
View File


BIN
res/silentdragon_uk.qm


+ 228
- 213
res/silentdragon_uk.ts
File diff suppressed because it is too large
View File


BIN
res/silentdragon_zh.qm


+ 225
- 210
res/silentdragon_zh.ts
File diff suppressed because it is too large
View File


BIN
res/zcashdlogo.gif

Before After
Width: 712  |  Height: 361  |  Size: 13 KiB Width: 712  |  Height: 519  |  Size: 74 KiB

+ 1
- 1
run-after-build.sh

@ -1,4 +1,4 @@
#!/bin/bash
# Copyright 2019-2020 The Hush Developers
# Copyright 2019-2021 The Hush Developers
./build.sh && ./silentdragon

+ 2
- 4
silentdragon.pro

@ -1,8 +1,6 @@
#-------------------------------------------------
#
# Copyright 2018-2021 The Hush Developers
# Released under the GPLv3
# Project created by QtCreator 2018-10-05T09:54:45
#
#-------------------------------------------------
QT += core gui network

+ 2
- 1
src/3rdparty/sodium.h

@ -1,9 +1,10 @@
// Copyright (c) 2019-2021 The Hush developers
// Released under the GPLv3
#ifndef sodium_H
#define sodium_H
#include "sodium/version.h"
#include "sodium/core.h"
#include "sodium/crypto_aead_aes256gcm.h"
#include "sodium/crypto_aead_chacha20poly1305.h"

+ 5
- 5
src/about.ui

@ -53,13 +53,13 @@
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:12pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8.1pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;Copyright(c) 2019-2020 The Hush developers (GPLv3)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;Copyright (c) 2019 Duke Leto, David Mercer and Aditya Kulkarni. (MIT License)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;Copyright(c) 2019-2021 The Hush developers (GPLv3)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;Copyright (c) 2019 Duke Leto, Jane Mercer and Aditya Kulkarni. (MIT License)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;Special thanks to:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;JSON for Modern C++ : &lt;/span&gt;&lt;a href=&quot;https://nlohmann.github.io/json/&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;https://nlohmann.github.io/json/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;QR Code generator library Nayuki : &lt;/span&gt;&lt;a href=&quot;https://www.nayuki.io/page/qr-code-generator-library&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;https://www.nayuki.io/page/qr-code-ge…&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;Made with QT : &lt;/span&gt;&lt;a href=&quot;https://www.qt.io/&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;https://www.qt.io/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;JSON for Modern C++ : &lt;/span&gt;&lt;a href=&quot;https://nlohmann.github.io/json/&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2';text-decoration: underline; color:#0000ff;&quot;&gt;https://nlohmann.github.io/json/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;QR Code generator library Nayuki : &lt;/span&gt;&lt;a href=&quot;https://www.nayuki.io/page/qr-code-generator-library&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; text-decoration: underline; color:#0000ff;&quot;&gt;https://www.nayuki.io/page/qr-code-ge…&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;Made with QT : &lt;/span&gt;&lt;a href=&quot;https://www.qt.io/&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; text-decoration: underline; color:#0000ff;&quot;&gt;https://www.qt.io/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;LICENSE:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;https://www.gnu.org/licenses/gpl-3.0.en.html

+ 2
- 0
src/addressbook.cpp

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#include "addressbook.h"
#include "ui_addressbook.h"
#include "ui_mainwindow.h"

+ 3
- 1
src/addressbook.h

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#ifndef ADDRESSBOOK_H
#define ADDRESSBOOK_H
@ -66,4 +68,4 @@ private:
static AddressBook* instance;
};
#endif // ADDRESSBOOK_H
#endif // ADDRESSBOOK_H

+ 3
- 1
src/addresscombo.cpp

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#include "addresscombo.h"
#include "addressbook.h"
#include "settings.h"
@ -36,4 +38,4 @@ void AddressCombo::insertItem(int index, const QString& text, double bal) {
QString txt = AddressBook::addLabelToAddress(text) %
"(" % Settings::getDisplayFormat(bal) % ")";
QComboBox::insertItem(index, txt);
}
}

+ 2
- 0
src/addresscombo.h

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#ifndef ADDRESSCOMBO_H
#define ADDRESSCOMBO_H

+ 2
- 0
src/balancestablemodel.cpp

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#include "balancestablemodel.h"
#include "addressbook.h"
#include "settings.h"

+ 3
- 1
src/balancestablemodel.h

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#ifndef BALANCESTABLEMODEL_H
#define BALANCESTABLEMODEL_H
@ -31,4 +33,4 @@ private:
bool loading = true;
};
#endif // BALANCESTABLEMODEL_H
#endif // BALANCESTABLEMODEL_H

+ 25
- 41
src/connection.cpp

@ -1,15 +1,13 @@
// Copyright 2019-2020 The Hush developers
// GPLv3
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#include "connection.h"
#include "mainwindow.h"
#include "settings.h"
#include "ui_connection.h"
#include "ui_createzcashconfdialog.h"
#include "rpc.h"
#include "precompiled.h"
ConnectionLoader::ConnectionLoader(MainWindow* main, RPC* rpc) {
this->main = main;
this->rpc = rpc;
@ -52,7 +50,7 @@ void ConnectionLoader::loadConnection() {
void ConnectionLoader::doAutoConnect(bool tryEzcashdStart) {
// Priority 1: Ensure all params are present.
if (!verifyParams()) {
downloadParams([=]() { this->doAutoConnect(); });
qDebug() << "Cannot find sapling params!";
return;
}
@ -84,11 +82,11 @@ void ConnectionLoader::doAutoConnect(bool tryEzcashdStart) {
// We're going to attempt to connect to the one in the background one last time
// and see if that works, else throw an error
main->logger->write("Unknown problem while trying to start hushd!");
QTimer::singleShot(2000, [=]() { doAutoConnect(/* don't attempt to start ezcashd */ false); });
QTimer::singleShot(2000, [=]() { doAutoConnect(/* don't attempt to start ehushd */ false); });
}
}
} else {
// We tried to start ezcashd previously, and it didn't work. So, show the error.
// We tried to start ehushd previously, and it didn't work. So, show the error.
main->logger->write("Couldn't start embedded hushd for unknown reason");
QString explanation;
if (config->zcashDaemon) {
@ -100,7 +98,7 @@ void ConnectionLoader::doAutoConnect(bool tryEzcashdStart) {
explanation = QString() % QObject::tr("Couldn't start the embedded hushd.\n\n"
"Please try restarting.\n\nIf you previously started hushd with custom arguments, you might need to reset HUSH3.conf.\n\n"
"If all else fails, please run hushd manually.") %
(ezcashd ? QObject::tr("The process returned") + ":\n\n" % ezcashd->errorString() : QString(""));
(ehushd ? QObject::tr("The process returned") + ":\n\n" % ehushd->errorString() : QString(""));
}
this->showError(explanation);
@ -202,7 +200,7 @@ void ConnectionLoader::createZcashConf() {
QTextStream out(&file);
out << "# Autogenerated by Hush SilentDragon https://myhush.org\n";
out << "# Autogenerated by Hush SilentDragon https://hush.is\n";
out << "server=1\n";
out << "rpcuser=hush\n";
out << "rpcpassword=" % randomPassword() << "\n";
@ -231,19 +229,6 @@ void ConnectionLoader::createZcashConf() {
}
void ConnectionLoader::downloadParams(std::function<void(void)> cb) {
main->logger->write("Adding params to download queue");
// Add all the files to the download queue
downloadQueue = new QQueue<QUrl>();
client = new QNetworkAccessManager(main);
//Currently we fallback to this in rare edgecases, it's not normally executed
downloadQueue->enqueue(QUrl("https://z.cash/downloads/sapling-output.params"));
downloadQueue->enqueue(QUrl("https://z.cash/downloads/sapling-spend.params"));
doNextDownload(cb);
}
void ConnectionLoader::doNextDownload(std::function<void(void)> cb) {
auto fnSaveFileName = [&] (QUrl url) {
QString path = url.path();
@ -343,8 +328,8 @@ bool ConnectionLoader::startEmbeddedZcashd() {
// Static because it needs to survive even after this method returns.
static QString processStdErrOutput;
if (ezcashd != nullptr) {
if (ezcashd->state() == QProcess::NotRunning) {
if (ehushd != nullptr) {
if (ehushd->state() == QProcess::NotRunning) {
if (!processStdErrOutput.isEmpty()) {
QMessageBox::critical(main, QObject::tr("hushd error"), "hushd said: " + processStdErrOutput,
QMessageBox::Ok);
@ -372,48 +357,47 @@ bool ConnectionLoader::startEmbeddedZcashd() {
main->logger->write("Found hushd at " + hushdProgram);
}
ezcashd = std::shared_ptr<QProcess>(new QProcess(main));
QObject::connect(ezcashd.get(), &QProcess::started, [=] () {
ehushd = std::shared_ptr<QProcess>(new QProcess(main));
QObject::connect(ehushd.get(), &QProcess::started, [=] () {
qDebug() << "Embedded hushd started via " << hushdProgram;
});
QObject::connect(ezcashd.get(), QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
QObject::connect(ehushd.get(), QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
[=](int exitCode, QProcess::ExitStatus exitStatus) {
qDebug() << "hushd finished with code " << exitCode << "," << exitStatus;
});
QObject::connect(ezcashd.get(), &QProcess::errorOccurred, [&] (QProcess::ProcessError error) {
QObject::connect(ehushd.get(), &QProcess::errorOccurred, [&] (QProcess::ProcessError error) {
qDebug() << "Couldn't start hushd at " << hushdProgram << ":" << error;
});
std::weak_ptr<QProcess> weak_obj(ezcashd);
std::weak_ptr<QProcess> weak_obj(ehushd);
auto ptr_main(main);
QObject::connect(ezcashd.get(), &QProcess::readyReadStandardError, [weak_obj, ptr_main]() {
QObject::connect(ehushd.get(), &QProcess::readyReadStandardError, [weak_obj, ptr_main]() {
auto output = weak_obj.lock()->readAllStandardError();
ptr_main->logger->write("hushd stderr:" + output);
processStdErrOutput.append(output);
});
// This string should be the exact arg list seperated by single spaces
QString params = "-ac_name=HUSH3 -ac_sapling=1 -ac_reward=0,1125000000,562500000 -ac_halving=129,340000,840000 -ac_end=128,340000,5422111 -ac_eras=3 -ac_blocktime=150 -ac_cc=2 -ac_ccenable=228,234,235,236,241 -ac_founders=1 -ac_supply=6178674 -ac_perc=11111111 -clientname=GoldenSandtrout -addnode=188.165.212.101 -addnode=64.120.113.130 -addnode=209.58.144.205 -addnode=94.130.35.94 -ac_cclib=hush3 -ac_script=76a9145eb10cf64f2bab1b457f1f25e658526155928fac88ac";
QString params = "-ac_name=HUSH3 -ac_sapling=1 -ac_reward=0,1125000000,562500000 -ac_halving=129,340000,840000 -ac_end=128,340000,5422111 -ac_eras=3 -ac_blocktime=150 -ac_cc=2 -ac_ccenable=228,234,235,236,241 -ac_founders=1 -ac_supply=6178674 -ac_perc=11111111 -clientname=GoldenSandtrout -addnode=node1.hush.is -addnode=node2.hush.is -addnode=node3.hush.is -addnode=node4.hush.is -addnode=node5.hush.is -addnode=node6.hush.is -addnode=node7.hush.is -addnode=node8.hush.is -ac_cclib=hush3 -tls=only -ac_script=76a9145eb10cf64f2bab1b457f1f25e658526155928fac88ac";
QStringList arguments = params.split(" ");
// Finally, actually start the full node
// Finally, actually start the full node
#ifdef Q_OS_LINUX
qDebug() << "Starting on Linux: " + hushdProgram + " " + params;
ezcashd->start(hushdProgram, arguments);
ehushd->start(hushdProgram, arguments);
#elif defined(Q_OS_DARWIN)
qDebug() << "Starting on Darwin: " + hushdProgram + " " + params;
ezcashd->start(hushdProgram, arguments);
ehushd->start(hushdProgram, arguments);
#elif defined(Q_OS_WIN64)
qDebug() << "Starting on Win64: " + hushdProgram + " " + params;
ezcashd->setWorkingDirectory(appPath.absolutePath());
ezcashd->start(hushdProgram, arguments);
ehushd->setWorkingDirectory(appPath.absolutePath());
ehushd->start(hushdProgram, arguments);
#else
qDebug() << "Starting on Unknown OS(!): " + hushdProgram + " " + params;
ezcashd->setWorkingDirectory(appPath.absolutePath());
ezcashd->start(hushdProgram, arguments);
ehushd->setWorkingDirectory(appPath.absolutePath());
ehushd->start(hushdProgram, arguments);
#endif // Q_OS_LINUX
main->logger->write("Started via " + hushdProgram + " " + params);
@ -449,7 +433,7 @@ void ConnectionLoader::doManualConnect() {
}
void ConnectionLoader::doRPCSetConnection(Connection* conn) {
rpc->setEZcashd(ezcashd);
rpc->setEZcashd(ehushd);
rpc->setConnection(conn);
d->accept();
@ -668,7 +652,7 @@ std::shared_ptr ConnectionLoader::autoDetectZcashConf() {
auto zcashconf = new ConnectionConfig();
zcashconf->host = "127.0.0.1";
zcashconf->connType = ConnectionType::DetectedConfExternalZcashD;
zcashconf->connType = ConnectionType::DetectedConfExternalHushD;
zcashconf->usingZcashConf = true;
zcashconf->zcashDir = QFileInfo(confLocation).absoluteDir().absolutePath();
zcashconf->zcashDaemon = false;

+ 5
- 3
src/connection.h

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#ifndef CONNECTION_H
#define CONNECTION_H
@ -8,9 +10,9 @@
class RPC;
enum ConnectionType {
DetectedConfExternalZcashD = 1,
DetectedConfExternalHushD = 1,
UISettingsZCashD,
InternalZcashD
InternalHushD
};
struct ConnectionConfig {
@ -65,7 +67,7 @@ private:
void doRPCSetConnection(Connection* conn);
std::shared_ptr<QProcess> ezcashd;
std::shared_ptr<QProcess> ehushd;
QDialog* d;
Ui_ConnectionDialog* connD;

+ 3
- 1
src/fillediconlabel.cpp

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#include "fillediconlabel.h"
FilledIconLabel::FilledIconLabel(QWidget* parent) :
@ -24,4 +26,4 @@ void FilledIconLabel::resizeEvent(QResizeEvent*) {
painter.drawPixmap((sz.width() - scaled.width()) / 2, (sz.height() - scaled.height()) / 2, scaled);
QLabel::setPixmap(p);
}
}

+ 3
- 1
src/fillediconlabel.h

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#ifndef FILLEDICONLABEL_H
#define FILLEDICONLABEL_H
@ -18,4 +20,4 @@ private:
};
#endif // FILLEDICONLABEL_H
#endif // FILLEDICONLABEL_H

+ 3
- 1
src/logger.cpp

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#include "logger.h"
Logger::Logger(QObject *parent, QString fileName) : QObject(parent) {
@ -28,4 +30,4 @@ void Logger::write(const QString &value) {
Logger::~Logger() {
if (file != 0)
file->close();
}
}

+ 3
- 1
src/logger.h

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#ifndef LOGGER_H
#define LOGGER_H
@ -20,4 +22,4 @@ public slots:
void write(const QString &value);
};
#endif // LOGGER_H
#endif // LOGGER_H

+ 2
- 4
src/main.cpp

@ -1,12 +1,10 @@
// Copyright 2019-2020 The Hush developers
// GPLv3
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#include <singleapplication.h>
#include "precompiled.h"
#include "mainwindow.h"
#include "rpc.h"
#include "settings.h"
#include "version.h"
class SignalHandler

+ 12
- 19
src/mainwindow.cpp

@ -1,4 +1,4 @@
// Copyright 2019-2020 The Hush Developers
// Copyright 2019-2021 The Hush Developers
// Released under the GPLv3
#include "mainwindow.h"
#include "addressbook.h"
@ -48,16 +48,11 @@ MainWindow::MainWindow(QWidget *parent) :
// Settings editor
setupSettingsModal();
// Set up exit action
// Set up actions
QObject::connect(ui->actionExit, &QAction::triggered, this, &MainWindow::close);
// Set up feedback action
QObject::connect(ui->actionDonate, &QAction::triggered, this, &MainWindow::donate);
QObject::connect(ui->actionDiscord, &QAction::triggered, this, &MainWindow::discord);
QObject::connect(ui->actionTelegram, &QAction::triggered, this, &MainWindow::telegram);
QObject::connect(ui->actionReportBug, &QAction::triggered, this, &MainWindow::reportbug);
QObject::connect(ui->actionWebsite, &QAction::triggered, this, &MainWindow::website);
// Set up check for updates action
@ -339,7 +334,7 @@ void MainWindow::setupSettingsModal() {
isUsingTor = !rpc->getConnection()->config->proxy.isEmpty();
}
settings.chkTor->setChecked(isUsingTor);
if (rpc->getEZcashD() == nullptr) {
if (rpc->getEHushD() == nullptr) {
settings.chkTor->setEnabled(false);
settings.lblTor->setEnabled(false);
QString tooltip = tr("Tor configuration is available only when running an embedded hushd.");
@ -363,7 +358,7 @@ void MainWindow::setupSettingsModal() {
isUsingConsolidation = !rpc->getConnection()->config->consolidation.isEmpty() == true;
}
settings.chkConso->setChecked(isUsingConsolidation);
if (rpc->getEZcashD() == nullptr) {
if (rpc->getEHushD() == nullptr) {
settings.chkConso->setEnabled(false);
}
@ -374,7 +369,7 @@ void MainWindow::setupSettingsModal() {
isUsingDeletetx = !rpc->getConnection()->config->deletetx.isEmpty() == true;
}
settings.chkDeletetx->setChecked(isUsingDeletetx);
if (rpc->getEZcashD() == nullptr) {
if (rpc->getEHushD() == nullptr) {
settings.chkDeletetx->setEnabled(false);
}
@ -385,7 +380,7 @@ void MainWindow::setupSettingsModal() {
isUsingZindex = !rpc->getConnection()->config->zindex.isEmpty() == true;
}
settings.chkzindex->setChecked(isUsingZindex);
if (rpc->getEZcashD() == nullptr) {
if (rpc->getEHushD() == nullptr) {
settings.chkzindex->setEnabled(false);
}
@ -579,18 +574,18 @@ void MainWindow::addressBook() {
AddressBook::open(this);
}
void MainWindow::discord() {
QString url = "https://myhush.org/discord/";
void MainWindow::telegram() {
QString url = "https://hush.is/tg";
QDesktopServices::openUrl(QUrl(url));
}
void MainWindow::reportbug() {
QString url = "https://github.com/MyHush/SilentDragon/issues/new";
QString url = "https://git.hush.is/hush/SilentDragon/issues/new";
QDesktopServices::openUrl(QUrl(url));
}
void MainWindow::website() {
QString url = "https://myhush.org";
QString url = "https://hush.is";
QDesktopServices::openUrl(QUrl(url));
}
@ -608,9 +603,7 @@ void MainWindow::donate() {
ui->tabWidget->setCurrentIndex(1);
}
/**
* Validate an address
*/
// Validate an address
void MainWindow::validateAddress() {
// Make sure everything is up and running
if (!getRPC() || !getRPC()->getConnection())

+ 4
- 1
src/mainwindow.h

@ -1,8 +1,11 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "precompiled.h"
#include "logger.h"
#include <memory>
// Forward declare to break circular dependency.
class RPC;
@ -116,7 +119,7 @@ private:
void donate();
void website();
void discord();
void telegram();
void reportbug();
void addressBook();
void postToZBoard();

+ 9
- 7
src/mainwindow.ui

@ -1078,7 +1078,7 @@
<property name="title">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<layout class="QGridLayout" name="gridLayout_51">
<item row="5" column="0" colspan="3">
<widget class="QLabel" name="label_14">
<property name="text">
@ -1176,6 +1176,7 @@
</property>
</widget>
</item>
<!--
<item row="10" column="0">
<widget class="QLabel" name="kmdversionlabel">
<property name="text">
@ -1183,6 +1184,7 @@
</property>
</widget>
</item>
-->
<item row="10" column="2">
<widget class="QLabel" name="kmdversion">
<property name="text">
@ -1540,7 +1542,7 @@
<string>&amp;Help</string>
</property>
<addaction name="actionDonate"/>
<addaction name="actionDiscord"/>
<addaction name="actionTelegram"/>
<addaction name="actionWebsite"/>
<addaction name="actionCheck_for_Updates"/>
<addaction name="actionReportBug"/>
@ -1563,8 +1565,8 @@
</widget>
<addaction name="menuFile"/>
<addaction name="menu_Edit"/>
<addaction name="menuHelp"/>
<addaction name="menuApps"/>
<addaction name="menuHelp"/>
</widget>
<widget class="QStatusBar" name="statusBar"/>
<action name="actionExit">
@ -1579,7 +1581,7 @@
</action>
<action name="actionReportBug">
<property name="text">
<string>&amp;Report a bug on Github</string>
<string>&amp;Report a bug</string>
</property>
</action>
<action name="actionSettings">
@ -1595,9 +1597,9 @@
<string>&amp;Send Duke Feedback</string>
</property>
</action>
<action name="actionDiscord">
<action name="actionTelegram">
<property name="text">
<string>&amp;Hush Discord</string>
<string>&amp;Hush Telegram</string>
</property>
</action>
<action name="actionWebsite">
@ -1607,7 +1609,7 @@
</action>
<action name="actionCheck_for_Updates">
<property name="text">
<string>Check github.com for &amp;updates</string>
<string>Check git.hush.is for &amp;updates</string>
</property>
</action>
<action name="actionTurnstile_Migration">

+ 3
- 1
src/memoedit.cpp

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#include "memoedit.h"
MemoEdit::MemoEdit(QWidget* parent) : QPlainTextEdit(parent) {
@ -49,4 +51,4 @@ void MemoEdit::includeReplyTo(QString addr) {
return;
this->setPlainText(curText + "\n" + tr("Reply to") + ":\n" + addr);
}
}

+ 3
- 1
src/memoedit.h

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#ifndef MEMOEDIT_H
#define MEMOEDIT_H
@ -20,4 +22,4 @@ private:
QPushButton* acceptButton = nullptr;
};
#endif // MEMOEDIT_H
#endif // MEMOEDIT_H

+ 2
- 0
src/mobileappconnector.cpp

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#include "mobileappconnector.h"
#include "ui_mobileappconnector.h"

+ 2
- 0
src/mobileappconnector.h

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#ifndef MOBILEAPPCONNECTOR_H
#define MOBILEAPPCONNECTOR_H

+ 2
- 0
src/precompiled.h

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#if defined __cplusplus
/* Add C++ includes here */

+ 3
- 1
src/qrcodelabel.cpp

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#include "qrcodelabel.h"
QRCodeLabel::QRCodeLabel(QWidget *parent) :
@ -54,4 +56,4 @@ QPixmap QRCodeLabel::scaledPixmap() const {
void QRCodeLabel::setQrcodeString(QString stra) {
str = stra;
QLabel::setPixmap(scaledPixmap());
}
}

+ 2
- 0
src/qrcodelabel.h

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#ifndef QRCODELABEL_H
#define QRCODELABEL_H

+ 3
- 1
src/recurring.cpp

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#include "recurring.h"
#include "mainwindow.h"
@ -45,4 +47,4 @@ void Recurring::showEditDialog(QWidget* parent, MainWindow* main, Tx tx) {
ui.txtDesc->setFocus();
d.exec();
}
}

+ 3
- 1
src/recurring.h

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#ifndef RECURRING_H
#define RECURRING_H
@ -33,4 +35,4 @@ public:
static void showEditDialog(QWidget* parent, MainWindow* main, Tx tx);
};
#endif // RECURRING_H
#endif // RECURRING_H

+ 2
- 0
src/requestdialog.cpp

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#include "requestdialog.h"
#include "ui_requestdialog.h"
#include "settings.h"

+ 2
- 0
src/requestdialog.h

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#ifndef REQUESTDIALOG_H
#define REQUESTDIALOG_H

+ 18
- 14
src/rpc.cpp

@ -1,14 +1,12 @@
// Copyright 2019-2020 The Hush Developers
// Copyright 2019-2021 The Hush Developers
// Released under the GPLv3
#include "rpc.h"
#include "addressbook.h"
#include "settings.h"
#include "senttxstore.h"
#include "version.h"
#include "websockets.h"
RPC::RPC(MainWindow* main) {
auto cl = new ConnectionLoader(main, this);
@ -71,9 +69,9 @@ RPC::~RPC() {
}
void RPC::setEZcashd(std::shared_ptr<QProcess> p) {
ezcashd = p;
ehushd = p;
if (ezcashd && ui->tabWidget->widget(4) == nullptr) {
if (ehushd && ui->tabWidget->widget(4) == nullptr) {
ui->tabWidget->addTab(main->zcashdtab, "zcashd");
}
}
@ -94,7 +92,7 @@ void RPC::setConnection(Connection* c) {
// Refresh the UI
refreshPrice();
checkForUpdate();
//checkForUpdate();
// Force update, because this might be coming from a settings update
// where we need to immediately refresh
@ -572,12 +570,14 @@ void RPC::getInfoThenRefresh(bool force) {
int notarized = reply["notarized"].toInt();
int protocolversion = reply["protocolversion"].toInt();
int lag = curBlock - notarized;
int blocks_until_halving= 340000 - curBlock;
// TODO: store all future halvings
int blocks_until_halving= 2020000 - curBlock;
char halving_days[8];
sprintf(halving_days, "%.2f", (double) (blocks_until_halving * 150) / (60*60*24) );
QString ntzhash = reply["notarizedhash"].toString();
QString ntztxid = reply["notarizedtxid"].toString();
QString kmdver = reply["KMDversion"].toString();
// Fuck The KYC Traitor named jl777
//QString kmdver = reply["KMDversion"].toString();
Settings::getInstance()->setZcashdVersion(version);
@ -586,7 +586,7 @@ void RPC::getInfoThenRefresh(bool force) {
ui->notarizedtxidvalue->setText( ntztxid );
ui->lagvalue->setText( QString::number(lag) );
ui->version->setText( QString::number(version) );
ui->kmdversion->setText( kmdver );
//ui->kmdversion->setText( kmdver );
ui->protocolversion->setText( QString::number(protocolversion) );
ui->p2pport->setText( QString::number(p2pport) );
ui->rpcport->setText( QString::number(rpcport) );
@ -621,6 +621,7 @@ void RPC::getInfoThenRefresh(bool force) {
conn->doRPCIgnoreError(makePayload(method), [=](const QJsonValue& reply) {
qint64 solrate = reply.toInt();
// TODO: megasol
ui->solrate->setText(QString::number(solrate) % " Sol/s");
});
@ -1025,12 +1026,15 @@ void RPC::watchTxStatus() {
}
void RPC::checkForUpdate(bool silent) {
// Disable update checks for now
// TODO: Use Gitea API
return;
qDebug() << "checking for updates";
if (conn == nullptr)
return noConnection();
QUrl cmcURL("https://api.github.com/repos/MyHush/SilentDragon/releases");
QUrl cmcURL("https://git.hush.is/hush/SilentDragon/releases");
QNetworkRequest req;
req.setUrl(cmcURL);
@ -1074,7 +1078,7 @@ void RPC::checkForUpdate(bool silent) {
.arg(currentVersion.toString()),
QMessageBox::Yes, QMessageBox::Cancel);
if (ans == QMessageBox::Yes) {
QDesktopServices::openUrl(QUrl("https://github.com/MyHush/SilentDragon/releases"));
QDesktopServices::openUrl(QUrl("https://git.hush.is/hush/SilentDragon/releases"));
} else {
// If the user selects cancel, don't bother them again for this version
s.setValue("update/lastversion", maxVersion.toString());
@ -1208,7 +1212,7 @@ void RPC::refreshPrice() {
void RPC::shutdownZcashd() {
// Shutdown embedded hushd if it was started
if (ezcashd == nullptr || ezcashd->processId() == 0 || conn == nullptr) {
if (ehushd == nullptr || ehushd->processId() == 0 || conn == nullptr) {
// No hushd running internally, just return
return;
}
@ -1247,8 +1251,8 @@ void RPC::shutdownZcashd() {
QObject::connect(&waiter, &QTimer::timeout, [&] () {
waitCount++;
if ((ezcashd->atEnd() && ezcashd->processId() == 0) ||
ezcashd->state() == QProcess::NotRunning ||
if ((ehushd->atEnd() && ehushd->processId() == 0) ||
ehushd->state() == QProcess::NotRunning ||
waitCount > 30 ||
conn->config->zcashDaemon) { // If hushd is daemon, then we don't have to do anything else
qDebug() << "Ended";

+ 5
- 3
src/rpc.h

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#ifndef RPCCLIENT_H
#define RPCCLIENT_H
@ -37,7 +39,7 @@ public:
void setConnection(Connection* c);
void setEZcashd(std::shared_ptr<QProcess> p);
const QProcess* getEZcashD() { return ezcashd.get(); }
const QProcess* getEHushD() { return ehushd.get(); }
void refresh(bool force = false);
@ -78,7 +80,7 @@ public:
void shutdownZcashd();
void noConnection();
bool isEmbedded() { return ezcashd != nullptr; }
bool isEmbedded() { return ehushd != nullptr; }
QString getDefaultSaplingAddress();
QString getDefaultTAddress();
@ -111,7 +113,7 @@ private:
void getTAddresses (const std::function<void(QJsonValue)>& cb);
Connection* conn = nullptr;
std::shared_ptr<QProcess> ezcashd = nullptr;
std::shared_ptr<QProcess> ehushd = nullptr;
QList<UnspentOutput>* utxos = nullptr;
QMap<QString, double>* allBalances = nullptr;

+ 1
- 1
src/scripts/dotranslations.sh

@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2019-2020 The Hush developers
# Copyright (c) 2019-2021 The Hush developers
# Released under the GPLv3
if [ -z $QT_STATIC ]; then

+ 1
- 1
src/scripts/make-binary-tarball.sh

@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2020 The Hush developers
# Copyright (c) 2019-2021 The Hush developers
# Released under the GPLv3
APP_VERSION=$(cat src/version.h | cut -d\" -f2)

+ 1
- 1
src/scripts/make-deb.sh

@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2019-2020 The Hush developers
# Copyright (c) 2019-2021 The Hush developers
# Thanks to Zecwallet for the original code
# Released under the GPLv3

+ 1
- 1
src/scripts/make-only-deb.sh

@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2020 The Hush developers
# Copyright (c) 2019-2021 The Hush developers
# Released under the GPLv3
echo "Let There Be Debian Packages"

+ 2
- 0
src/scripts/mkmacdmg.sh

@ -1,4 +1,6 @@
#!/bin/bash
# Copyright (c) 2019-2021 The Hush developers
# Released under the GPLv3
# Accept the variables as command line arguments as well
POSITIONAL=()

+ 1
- 1
src/scripts/mkrelease.sh

@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2019-2020 The Hush developers
# Copyright (c) 2019-2021 The Hush developers
# Thanks to Zecwallet for the original code
# Released under the GPLv3

+ 2
- 0
src/scripts/signbinaries.sh

@ -1,4 +1,6 @@
#!/bin/bash
# Copyright (c) 2019-2021 The Hush developers
# Released under the GPLv3
# Accept the variables as command line arguments as well
POSITIONAL=()

+ 4
- 3
src/sendtab.cpp

@ -1,4 +1,5 @@
// Copyright 2019-2020 Hush developers
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "addressbook.h"
@ -776,9 +777,10 @@ QString MainWindow::doSendTxValidations(Tx tx) {
}
for (auto toAddr : tx.toAddrs) {
//TODO: diff errors for completely invalid vs transparent? Educate.
if (!Settings::isValidAddress(toAddr.addr)) {
QString addr = (toAddr.addr.length() > 100 ? toAddr.addr.left(100) + "..." : toAddr.addr);
return QString(tr("Recipient Address ")) % addr % tr(" is Invalid");
return QString(tr("Extreme Privacy! ")) % addr % tr(" is transparent. You must send to a zaddr.");
}
// This technically shouldn't be possible, but issue #62 seems to have discovered a bug
@ -788,7 +790,6 @@ QString MainWindow::doSendTxValidations(Tx tx) {
}
}
return QString();
}

+ 2
- 0
src/senttxstore.cpp

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#include "senttxstore.h"
#include "settings.h"

+ 2
- 0
src/senttxstore.h

@ -1,3 +1,5 @@
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#ifndef SENTTXSTORE_H
#define SENTTXSTORE_H

+ 3
- 3
src/settings.cpp

@ -1,4 +1,4 @@
// Copyright 2019-2020 Hush developers
// Copyright 2019-2021 Hush developers
// Released under the GPLv3
#include "mainwindow.h"
#include "settings.h"
@ -35,8 +35,8 @@ void Settings::setAllowFetchPrices(bool allow) {
Explorer Settings::getExplorer() {
// Load from the QT Settings.
QSettings s;
//TODO: make it easy for people to use other explorers like komodod.com
QString explorer = "https://explorer.myhush.org";
//TODO: make it easy for people to use other explorers
QString explorer = "https://explorer.hush.is";
auto txExplorerUrl = s.value("explorer/txExplorerUrl", explorer + "/tx/").toString();
auto addressExplorerUrl = s.value("explorer/addressExplorerUrl", explorer + "/address/").toString();

+ 2
- 1
src/settings.h

@ -1,4 +1,5 @@
// Copyright 2019 The Hush developers
// Copyright 2019-2021 The Hush developers
// Released under the GPLv3
#ifndef SETTINGS_H
#define SETTINGS_H

+ 6
- 6
src/settings.ui

@ -162,7 +162,7 @@
</widget>
</item>
<item row="16" column="0">
<widget class="QLabel" name="label_20">
<widget class="QLabel" name="label_201">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>