Port to Hush

This commit is contained in:
DenioD
2019-10-21 00:16:23 +02:00
parent a69e5532fe
commit 5b9ef9a48c
49 changed files with 4301 additions and 369 deletions

View File

@@ -17,7 +17,7 @@
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string notr="true">ZecWallet FullNode</string>
<string notr="true">silentdragon FullNode</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>

View File

@@ -273,12 +273,12 @@ void AddressBook::readFromStorage() {
}
// Special.
// Add the default ZecWallet donation address if it isn't already present
// Add the default silentdragon donation address if it isn't already present
// QList<QString> allAddresses;
// std::transform(allLabels.begin(), allLabels.end(),
// std::back_inserter(allAddresses), [=] (auto i) { return i.second; });
// if (!allAddresses.contains(Settings::getDonationAddr(true))) {
// allLabels.append(QPair<QString, QString>("ZecWallet donation", Settings::getDonationAddr(true)));
// allLabels.append(QPair<QString, QString>("silentdragon donation", Settings::getDonationAddr(true)));
// }
}

View File

@@ -27,13 +27,13 @@ void AddressCombo::setCurrentText(const QString& text) {
void AddressCombo::addItem(const QString& text, double bal) {
QString txt = AddressBook::addLabelToAddress(text);
if (bal > 0)
txt = txt % "(" % Settings::getZECDisplayFormat(bal) % ")";
txt = txt % "(" % Settings::gethushDisplayFormat(bal) % ")";
QComboBox::addItem(txt);
}
void AddressCombo::insertItem(int index, const QString& text, double bal) {
QString txt = AddressBook::addLabelToAddress(text) %
"(" % Settings::getZECDisplayFormat(bal) % ")";
"(" % Settings::gethushDisplayFormat(bal) % ")";
QComboBox::insertItem(index, txt);
}

View File

@@ -88,14 +88,14 @@ QVariant BalancesTableModel::data(const QModelIndex &index, int role) const
if (role == Qt::DisplayRole) {
switch (index.column()) {
case 0: return AddressBook::addLabelToAddress(std::get<0>(modeldata->at(index.row())));
case 1: return Settings::getZECDisplayFormat(std::get<1>(modeldata->at(index.row())));
case 1: return Settings::gethushDisplayFormat(std::get<1>(modeldata->at(index.row())));
}
}
if(role == Qt::ToolTipRole) {
switch (index.column()) {
case 0: return AddressBook::addLabelToAddress(std::get<0>(modeldata->at(index.row())));
case 1: return Settings::getUSDFromZecAmount(std::get<1>(modeldata->at(index.row())));
case 1: return Settings::getUSDFromhushAmount(std::get<1>(modeldata->at(index.row())));
}
}

View File

@@ -5,7 +5,7 @@
#include "ui_createzcashconfdialog.h"
#include "controller.h"
#include "../lib/zecwalletlitelib.h"
#include "../lib/silentdragonlitelib.h"
#include "precompiled.h"
@@ -38,11 +38,11 @@ void ConnectionLoader::doAutoConnect() {
auto config = std::shared_ptr<ConnectionConfig>(new ConnectionConfig());
config->dangerous = true;
config->server = QString("https://127.0.0.1:9067");
config->server = QString("https://127.0.0.1:9069");
// Initialize the library
main->logger->write(QObject::tr("Attempting to initialize"));
litelib_initialze(config->dangerous, config->server.toStdString().c_str());
litelib_initialze_existing(config->dangerous, config->server.toStdString().c_str());
auto connection = makeConnection(config);

View File

@@ -14,7 +14,7 @@
</rect>
</property>
<property name="windowTitle">
<string>ZecWallet</string>
<string>silentdragon</string>
</property>
<property name="modal">
<bool>true</bool>

View File

@@ -28,7 +28,7 @@ Controller::Controller(MainWindow* main) {
priceTimer = new QTimer(main);
QObject::connect(priceTimer, &QTimer::timeout, [=]() {
if (Settings::getInstance()->getAllowFetchPrices())
refreshZECPrice();
refreshhushPrice();
});
priceTimer->start(Settings::priceRefreshSpeed); // Every hour
@@ -71,9 +71,9 @@ void Controller::setConnection(Connection* c) {
Settings::removeFromZcashConf(zcashConfLocation, "rescan");
Settings::removeFromZcashConf(zcashConfLocation, "reindex");
// If we're allowed to get the Zec Price, get the prices
// If we're allowed to get the hush Price, get the prices
if (Settings::getInstance()->getAllowFetchPrices())
refreshZECPrice();
refreshhushPrice();
// If we're allowed to check for updates, check for a new release
if (Settings::getInstance()->getCheckForUpdates())
@@ -285,14 +285,14 @@ void Controller::refreshBalances() {
AppDataModel::getInstance()->setBalances(balT, balZ);
ui->balSheilded ->setText(Settings::getZECDisplayFormat(balZ));
ui->balTransparent->setText(Settings::getZECDisplayFormat(balT));
ui->balTotal ->setText(Settings::getZECDisplayFormat(balTotal));
ui->balSheilded ->setText(Settings::gethushDisplayFormat(balZ));
ui->balTransparent->setText(Settings::gethushDisplayFormat(balT));
ui->balTotal ->setText(Settings::gethushDisplayFormat(balTotal));
ui->balSheilded ->setToolTip(Settings::getZECDisplayFormat(balZ));
ui->balTransparent->setToolTip(Settings::getZECDisplayFormat(balT));
ui->balTotal ->setToolTip(Settings::getZECDisplayFormat(balTotal));
ui->balSheilded ->setToolTip(Settings::gethushDisplayFormat(balZ));
ui->balTransparent->setToolTip(Settings::gethushDisplayFormat(balT));
ui->balTotal ->setToolTip(Settings::gethushDisplayFormat(balTotal));
});
// 2. Get the UTXOs
@@ -434,7 +434,7 @@ void Controller::checkForUpdate(bool silent) {
if (!zrpc->haveConnection())
return noConnection();
QUrl cmcURL("https://api.github.com/repos/ZcashFoundation/zecwallet/releases");
QUrl cmcURL("https://api.github.com/repos/ZcashFoundation/silentdragon/releases");
QNetworkRequest req;
req.setUrl(cmcURL);
@@ -482,7 +482,7 @@ void Controller::checkForUpdate(bool silent) {
.arg(currentVersion.toString()),
QMessageBox::Yes, QMessageBox::Cancel);
if (ans == QMessageBox::Yes) {
QDesktopServices::openUrl(QUrl("https://github.com/ZcashFoundation/zecwallet/releases"));
QDesktopServices::openUrl(QUrl("https://github.com/ZcashFoundation/silentdragon/releases"));
} else {
// If the user selects cancel, don't bother them again for this version
s.setValue("update/lastversion", maxVersion.toString());
@@ -503,8 +503,8 @@ void Controller::checkForUpdate(bool silent) {
});
}
// Get the ZEC->USD price from coinmarketcap using their API
void Controller::refreshZECPrice() {
// Get the hush->USD price from coinmarketcap using their API
void Controller::refreshhushPrice() {
if (!zrpc->haveConnection())
return noConnection();
@@ -528,7 +528,7 @@ void Controller::refreshZECPrice() {
} else {
qDebug() << reply->errorString();
}
Settings::getInstance()->setZECPrice(0);
Settings::getInstance()->sethushPrice(0);
return;
}
@@ -536,7 +536,7 @@ void Controller::refreshZECPrice() {
auto parsed = json::parse(all, nullptr, false);
if (parsed.is_discarded()) {
Settings::getInstance()->setZECPrice(0);
Settings::getInstance()->sethushPrice(0);
return;
}
@@ -544,7 +544,7 @@ void Controller::refreshZECPrice() {
if (item["symbol"].get<json::string_t>() == Settings::getTokenName().toStdString()) {
QString price = QString::fromStdString(item["price_usd"].get<json::string_t>());
qDebug() << Settings::getTokenName() << " Price=" << price;
Settings::getInstance()->setZECPrice(price.toDouble());
Settings::getInstance()->sethushPrice(price.toDouble());
return;
}
@@ -555,7 +555,7 @@ void Controller::refreshZECPrice() {
}
// If nothing, then set the price to 0;
Settings::getInstance()->setZECPrice(0);
Settings::getInstance()->sethushPrice(0);
});
}
@@ -579,7 +579,7 @@ void Controller::shutdownZcashd() {
// Ui_ConnectionDialog connD;
// connD.setupUi(&d);
// connD.topIcon->setBasePixmap(QIcon(":/icons/res/icon.ico").pixmap(256, 256));
// connD.status->setText(QObject::tr("Please wait for ZecWallet to exit"));
// connD.status->setText(QObject::tr("Please wait for silentdragon to exit"));
// connD.statusDetail->setText(QObject::tr("Waiting for zcashd to exit"));
// QTimer waiter(main);

View File

@@ -44,7 +44,7 @@ public:
void refreshAddresses();
void checkForUpdate(bool silent = true);
void refreshZECPrice();
void refreshhushPrice();
//void getZboardTopics(std::function<void(QMap<QString, QString>)> cb);
void executeStandardUITransaction(Tx tx);

View File

@@ -109,7 +109,7 @@
<item row="5" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Allow connections to the internet to check for updates, get ZEC/USD prices etc...</string>
<string>Allow connections to the internet to check for updates, get hush/USD prices etc...</string>
</property>
</widget>
</item>
@@ -202,7 +202,7 @@
<item row="4" column="1">
<widget class="QLabel" name="label_3">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Skips the most expensive checks during the initial block download. &lt;a href=&quot;https://docs.zecwallet.co/using-zecwallet/#fastsync&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;Learn More&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Skips the most expensive checks during the initial block download. &lt;a href=&quot;https://docs.silentdragon.co/using-silentdragon/#fastsync&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;Learn More&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>

View File

@@ -56,34 +56,6 @@ void LiteInterface::fetchPrivKey(QString addr, const std::function<void(json)>&
conn->doRPCWithDefaultErrorHandling("export", addr, cb);
}
// void LiteInterface::importZPrivKey(QString addr, bool rescan, const std::function<void(json)>& cb) {
// if (conn == nullptr)
// return;
// // json payload = {
// // {"jsonrpc", "1.0"},
// // {"id", "someid"},
// // {"method", "z_importkey"},
// // {"params", { addr.toStdString(), (rescan? "yes" : "no") }},
// // };
// // conn->doRPCWithDefaultErrorHandling(payload, cb);
// }
// void LiteInterface::importTPrivKey(QString addr, bool rescan, const std::function<void(json)>& cb) {
// if (conn == nullptr)
// return;
// // json payload = {
// // {"jsonrpc", "1.0"},
// // {"id", "someid"},
// // {"method", "importprivkey"},
// // {"params", { addr.toStdString(), (rescan? "yes" : "no") }},
// // };
// // conn->doRPCWithDefaultErrorHandling(payload, cb);
// }
void LiteInterface::fetchBalance(const std::function<void(json)>& cb) {
if (conn == nullptr)

View File

@@ -169,8 +169,8 @@ public:
return 0;
}
QCoreApplication::setOrganizationName("zecwallet-org");
QCoreApplication::setApplicationName("zecwallet");
QCoreApplication::setOrganizationName("silentdragon-org");
QCoreApplication::setApplicationName("silentdragon");
QString locale = QLocale::system().name();
locale.truncate(locale.lastIndexOf('_')); // Get the language code
@@ -214,7 +214,7 @@ public:
}
w = new MainWindow();
w->setWindowTitle("Zecwallet v" + QString(APP_VERSION));
w->setWindowTitle("silentdragon v" + QString(APP_VERSION));
// If there was a payment URI on the command line, pay it
if (parser.positionalArguments().length() > 0) {

View File

@@ -4,11 +4,9 @@
#include "ui_mainwindow.h"
#include "ui_mobileappconnector.h"
#include "ui_addressbook.h"
#include "ui_zboard.h"
#include "ui_privkey.h"
#include "ui_about.h"
#include "ui_settings.h"
#include "ui_turnstileprogress.h"
#include "ui_viewalladdresses.h"
#include "controller.h"
#include "balancestablemodel.h"
@@ -41,7 +39,7 @@ MainWindow::MainWindow(QWidget *parent) :
ui->setupUi(this);
logger = new Logger(this, QDir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)).filePath("zec-qt-wallet.log"));
logger = new Logger(this, QDir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)).filePath("hush-qt-wallet.log"));
// Status Bar
setupStatusBar();
@@ -57,7 +55,7 @@ MainWindow::MainWindow(QWidget *parent) :
// File a bug
QObject::connect(ui->actionFile_a_bug, &QAction::triggered, [=]() {
QDesktopServices::openUrl(QUrl("https://github.com/zcashfoundation/zecwallet/issues/new"));
QDesktopServices::openUrl(QUrl("https://github.com/zcashfoundation/silentdragon/issues/new"));
});
// Set up check for updates action
@@ -269,7 +267,7 @@ void MainWindow::setupSettingsModal() {
QObject::connect(settings.comboBoxTheme, &QComboBox::currentTextChanged, [=] (QString theme_name) {
this->slot_change_theme(theme_name);
// Tell the user to restart
QMessageBox::information(this, tr("Restart"), tr("Please restart ZecWallet to have the theme apply"), QMessageBox::Ok);
QMessageBox::information(this, tr("Restart"), tr("Please restart silentdragon to have the theme apply"), QMessageBox::Ok);
});
// Save sent transactions
@@ -357,7 +355,7 @@ void MainWindow::setupSettingsModal() {
rpc->getConnection()->config->proxy = "proxy=127.0.0.1:9050";
QMessageBox::information(this, tr("Enable Tor"),
tr("Connection over Tor has been enabled. To use this feature, you need to restart ZecWallet."),
tr("Connection over Tor has been enabled. To use this feature, you need to restart silentdragon."),
QMessageBox::Ok);
}
@@ -367,7 +365,7 @@ void MainWindow::setupSettingsModal() {
rpc->getConnection()->config->proxy.clear();
QMessageBox::information(this, tr("Disable Tor"),
tr("Connection over Tor has been disabled. To fully disconnect from Tor, you need to restart ZecWallet."),
tr("Connection over Tor has been disabled. To fully disconnect from Tor, you need to restart silentdragon."),
QMessageBox::Ok);
}
@@ -396,9 +394,9 @@ void MainWindow::setupSettingsModal() {
}
if (showRestartInfo) {
auto desc = tr("ZecWallet needs to restart to rescan/reindex. ZecWallet will now close, please restart ZecWallet to continue");
auto desc = tr("silentdragon needs to restart to rescan/reindex. silentdragon will now close, please restart silentdragon to continue");
QMessageBox::information(this, tr("Restart ZecWallet"), desc, QMessageBox::Ok);
QMessageBox::information(this, tr("Restart silentdragon"), desc, QMessageBox::Ok);
QTimer::singleShot(1, [=]() { this->close(); });
}
}
@@ -427,9 +425,9 @@ void MainWindow::donate() {
ui->Address1->setText(Settings::getDonationAddr());
ui->Address1->setCursorPosition(0);
ui->Amount1->setText("0.01");
ui->MemoTxt1->setText(tr("Thanks for supporting ZecWallet!"));
ui->MemoTxt1->setText(tr("Thanks for supporting silentdragon!"));
ui->statusBar->showMessage(tr("Donate 0.01 ") % Settings::getTokenName() % tr(" to support ZecWallet"));
ui->statusBar->showMessage(tr("Donate 0.01 ") % Settings::getTokenName() % tr(" to support silentdragon"));
// And switch to the send tab.
ui->tabWidget->setCurrentIndex(1);
@@ -1080,7 +1078,7 @@ void MainWindow::setupReceiveTab() {
}
ui->rcvLabel->setText(label);
ui->rcvBal->setText(Settings::getZECUSDDisplayFormat(rpc->getModel()->getAllBalances().value(addr)));
ui->rcvBal->setText(Settings::gethushUSDDisplayFormat(rpc->getModel()->getAllBalances().value(addr)));
ui->txtReceive->setPlainText(addr);
ui->qrcodeDisplay->setQrcodeString(addr);
if (rpc->getModel()->getUsedAddresses().value(addr, false)) {

View File

@@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>ZecWallet</string>
<string>silentdragon</string>
</property>
<property name="windowIcon">
<iconset resource="../application.qrc">

View File

@@ -33,7 +33,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Scan this QRCode from your ZecWallet companion app to connect your phone</string>
<string>Scan this QRCode from your silentdragon companion app to connect your phone</string>
</property>
</widget>
</item>
@@ -81,7 +81,7 @@
<item row="3" column="0">
<widget class="QCheckBox" name="chkInternetConn">
<property name="text">
<string>Allow connections over the internet via ZecWallet wormhole</string>
<string>Allow connections over the internet via silentdragon wormhole</string>
</property>
</widget>
</item>
@@ -91,7 +91,7 @@
<item row="1" column="2" rowspan="2">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>ZecWallet Companion App</string>
<string>silentdragon Companion App</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="5" column="0">

View File

@@ -81,7 +81,7 @@ QJsonObject RecurringPaymentInfo::toJson() {
}
QString RecurringPaymentInfo::getAmountPretty() const {
return currency == "USD" ? Settings::getUSDFormat(amt) : Settings::getZECDisplayFormat(amt);
return currency == "USD" ? Settings::getUSDFormat(amt) : Settings::gethushDisplayFormat(amt);
}
QString RecurringPaymentInfo::getScheduleDescription() const {
@@ -135,19 +135,19 @@ RecurringPaymentInfo* Recurring::getNewRecurringFromTx(QWidget* parent, MainWind
ui.lblTo->setText(tx.toAddrs[0].addr);
// Default is USD
ui.lblAmt->setText(Settings::getUSDFromZecAmount(tx.toAddrs[0].amount));
ui.lblAmt->setText(Settings::getUSDFromhushAmount(tx.toAddrs[0].amount));
ui.txtMemo->setPlainText(tx.toAddrs[0].memo);
ui.txtMemo->setEnabled(false);
}
// Wire up ZEC/USD toggle
// Wire up hush/USD toggle
QObject::connect(ui.cmbCurrency, &QComboBox::currentTextChanged, [&](QString c) {
if (tx.toAddrs.length() < 1)
return;
if (c == "USD") {
ui.lblAmt->setText(Settings::getUSDFromZecAmount(tx.toAddrs[0].amount));
ui.lblAmt->setText(Settings::getUSDFromhushAmount(tx.toAddrs[0].amount));
}
else {
ui.lblAmt->setText(Settings::getDecimalString(tx.toAddrs[0].amount));
@@ -203,7 +203,7 @@ void Recurring::updateInfoWithTx(RecurringPaymentInfo* r, Tx tx) {
r->fromAddr = tx.fromAddr;
if (r->currency.isEmpty() || r->currency == "USD") {
r->currency = "USD";
r->amt = tx.toAddrs[0].amount * Settings::getInstance()->getZECPrice();
r->amt = tx.toAddrs[0].amount * Settings::getInstance()->gethushPrice();
}
else {
r->currency = Settings::getTokenName();
@@ -459,21 +459,21 @@ void Recurring::processMultiplePending(RecurringPaymentInfo rpi, MainWindow* mai
}
void Recurring::executeRecurringPayment(MainWindow* main, RecurringPaymentInfo rpi, QList<int> paymentNumbers) {
// Amount is in USD or ZEC?
// Amount is in USD or hush?
auto amt = rpi.amt;
if (rpi.currency == "USD") {
// If there is no price, then fail the payment
if (Settings::getInstance()->getZECPrice() == 0) {
if (Settings::getInstance()->gethushPrice() == 0) {
for (auto paymentNumber: paymentNumbers) {
updatePaymentItem(rpi.getHash(), paymentNumber,
"", QObject::tr("No ZEC price was available to convert from USD"),
"", QObject::tr("No hush price was available to convert from USD"),
PaymentStatus::ERROR);
}
return;
}
// Translate it into ZEC
amt = rpi.amt / Settings::getInstance()->getZECPrice();
// Translate it into hush
amt = rpi.amt / Settings::getInstance()->gethushPrice();
}
// Build a Tx

View File

@@ -41,7 +41,7 @@
<item row="8" column="0" colspan="2">
<widget class="QLabel" name="label_2">
<property name="text">
<string>How should ZecWallet proceed?</string>
<string>How should silentdragon proceed?</string>
</property>
</widget>
</item>

View File

@@ -73,7 +73,7 @@ void RequestDialog::showPaymentConfirmation(MainWindow* main, QString paymentURI
req.txtFrom->setText(payInfo.addr);
req.txtMemo->setPlainText(payInfo.memo);
req.txtAmount->setText(payInfo.amt);
req.txtAmountUSD->setText(Settings::getUSDFromZecAmount(req.txtAmount->text().toDouble()));
req.txtAmountUSD->setText(Settings::getUSDFromhushAmount(req.txtAmount->text().toDouble()));
req.buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Pay"));
@@ -112,9 +112,9 @@ void RequestDialog::showRequestZcash(MainWindow* main) {
// Amount textbox
req.txtAmount->setValidator(main->getAmountValidator());
QObject::connect(req.txtAmount, &QLineEdit::textChanged, [=] (auto text) {
req.txtAmountUSD->setText(Settings::getUSDFromZecAmount(text.toDouble()));
req.txtAmountUSD->setText(Settings::getUSDFromhushAmount(text.toDouble()));
});
req.txtAmountUSD->setText(Settings::getUSDFromZecAmount(req.txtAmount->text().toDouble()));
req.txtAmountUSD->setText(Settings::getUSDFromhushAmount(req.txtAmount->text().toDouble()));
req.txtMemo->setAcceptButton(req.buttonBox->button(QDialogButtonBox::Ok));
req.txtMemo->setLenDisplayLabel(req.lblMemoLen);

View File

@@ -216,7 +216,7 @@
<item row="0" column="2" colspan="2">
<widget class="QLabel" name="lblHeader">
<property name="text">
<string>Request payment from a Sapling address. You'll send a ZEC 0.0001 transaction to the address with a zcash payment URI. The memo will be included in the transaction when the address pays you.</string>
<string>Request payment from a Sapling address. You'll send a hush 0.0001 transaction to the address with a zcash payment URI. The memo will be included in the transaction when the address pays you.</string>
</property>
<property name="wordWrap">
<bool>true</bool>

View File

@@ -1,9 +1,9 @@
Package: zec-qt-wallet
Package: hush-qt-wallet
Version: RELEASE_VERSION
Section: base
Priority: optional
Architecture: amd64
Maintainer: Aditya Kulkarni <zcash@adityapk.com>
Description: ZecWallet is a full node and UI wallet for Zcash.
ZecWallet is a full node and UI wallet for Zcash. It comes with
Description: silentdragon is a full node and UI wallet for Zcash.
silentdragon is a full node and UI wallet for Zcash. It comes with
full support for shielded addresses and many apps for Zcash.

View File

@@ -1,13 +1,13 @@
[Desktop Entry]
Name=ZecWallet
Name=silentdragon
Comment=Full node and wallet for Zcash
GenericName=Wallet
Exec=/usr/local/bin/zecwallet %u
Icon=zecwallet.xpm
Exec=/usr/local/bin/silentdragon %u
Icon=silentdragon.xpm
Type=Application
StartupNotify=true
StartupWMClass=zecwallet
StartupWMClass=silentdragon
Categories=Utility;
MimeType=x-scheme-handler/zcash;
Keywords=zecwallet;
Keywords=silentdragon;

View File

@@ -6,11 +6,11 @@ param (
)
Write-Host "[Initializing]"
Remove-Item -Force -ErrorAction Ignore ./artifacts/linux-binaries-zec-qt-wallet-v$version.tar.gz
Remove-Item -Force -ErrorAction Ignore ./artifacts/linux-deb-zec-qt-wallet-v$version.deb
Remove-Item -Force -ErrorAction Ignore ./artifacts/Windows-binaries-zec-qt-wallet-v$version.zip
Remove-Item -Force -ErrorAction Ignore ./artifacts/Windows-installer-zec-qt-wallet-v$version.msi
Remove-Item -Force -ErrorAction Ignore ./artifacts/macOS-zec-qt-wallet-v$version.dmg
Remove-Item -Force -ErrorAction Ignore ./artifacts/linux-binaries-hush-qt-wallet-v$version.tar.gz
Remove-Item -Force -ErrorAction Ignore ./artifacts/linux-deb-hush-qt-wallet-v$version.deb
Remove-Item -Force -ErrorAction Ignore ./artifacts/Windows-binaries-hush-qt-wallet-v$version.zip
Remove-Item -Force -ErrorAction Ignore ./artifacts/Windows-installer-hush-qt-wallet-v$version.msi
Remove-Item -Force -ErrorAction Ignore ./artifacts/macOS-hush-qt-wallet-v$version.dmg
Remove-Item -Recurse -Force -ErrorAction Ignore ./bin
Remove-Item -Recurse -Force -ErrorAction Ignore ./debug
@@ -26,7 +26,7 @@ Write-Host "[Building Linux + Windows]"
Write-Host -NoNewline "Copying files.........."
ssh $server "rm -rf /tmp/zqwbuild"
ssh $server "mkdir /tmp/zqwbuild"
scp -r src/ res/ ./zec-qt-wallet.pro ./application.qrc ./LICENSE ./README.md ${server}:/tmp/zqwbuild/ | Out-Null
scp -r src/ res/ ./hush-qt-wallet.pro ./application.qrc ./LICENSE ./README.md ${server}:/tmp/zqwbuild/ | Out-Null
ssh $server "dos2unix -q /tmp/zqwbuild/src/scripts/mkrelease.sh" | Out-Null
ssh $server "dos2unix -q /tmp/zqwbuild/src/version.h"
Write-Host "[OK]"
@@ -51,10 +51,10 @@ Write-Host "[OK]"
# Finally, test to make sure all files exist
Write-Host -NoNewline "Checking Build........."
if (! (Test-Path ./artifacts/linux-binaries-zec-qt-wallet-v$version.tar.gz) -or
! (Test-Path ./artifacts/linux-deb-zec-qt-wallet-v$version.deb) -or
! (Test-Path ./artifacts/Windows-binaries-zec-qt-wallet-v$version.zip) -or
! (Test-Path ./artifacts/Windows-installer-zec-qt-wallet-v$version.msi) ) {
if (! (Test-Path ./artifacts/linux-binaries-hush-qt-wallet-v$version.tar.gz) -or
! (Test-Path ./artifacts/linux-deb-hush-qt-wallet-v$version.deb) -or
! (Test-Path ./artifacts/Windows-binaries-hush-qt-wallet-v$version.zip) -or
! (Test-Path ./artifacts/Windows-installer-hush-qt-wallet-v$version.msi) ) {
Write-Host "[Error]"
exit 1;
}

View File

@@ -6,12 +6,12 @@ if [ -z $QT_STATIC ]; then
fi
rm -f res/*.qm
$QT_STATIC/bin/lrelease zec-qt-wallet.pro
$QT_STATIC/bin/lrelease hush-qt-wallet.pro
# Then update the qt base translations. First, get all languages
ls res/*.qm | awk -F '[_.]' '{print $4}' | while read -r language ; do
if [ -f $QT_STATIC/translations/qtbase_$language.qm ]; then
$QT_STATIC/bin/lconvert -o res/zec_$language.qm $QT_STATIC/translations/qtbase_$language.qm res/zec_qt_wallet_$language.qm
mv res/zec_$language.qm res/zec_qt_wallet_$language.qm
$QT_STATIC/bin/lconvert -o res/hush_$language.qm $QT_STATIC/translations/qtbase_$language.qm res/zec_qt_wallet_$language.qm
mv res/hush_$language.qm res/zec_qt_wallet_$language.qm
fi
done

View File

@@ -7,11 +7,11 @@ param (
)
Write-Host "[Initializing]"
Remove-Item -Force -ErrorAction Ignore ./artifacts/linux-binaries-zecwallet-v$version.tar.gz
Remove-Item -Force -ErrorAction Ignore ./artifacts/linux-deb-zecwallet-v$version.deb
Remove-Item -Force -ErrorAction Ignore ./artifacts/Windows-binaries-zecwallet-v$version.zip
Remove-Item -Force -ErrorAction Ignore ./artifacts/Windows-installer-zecwallet-v$version.msi
Remove-Item -Force -ErrorAction Ignore ./artifacts/macOS-zecwallet-v$version.dmg
Remove-Item -Force -ErrorAction Ignore ./artifacts/linux-binaries-silentdragon-v$version.tar.gz
Remove-Item -Force -ErrorAction Ignore ./artifacts/linux-deb-silentdragon-v$version.deb
Remove-Item -Force -ErrorAction Ignore ./artifacts/Windows-binaries-silentdragon-v$version.zip
Remove-Item -Force -ErrorAction Ignore ./artifacts/Windows-installer-silentdragon-v$version.msi
Remove-Item -Force -ErrorAction Ignore ./artifacts/macOS-silentdragon-v$version.dmg
Remove-Item -Force -ErrorAction Ignore ./artifacts/signatures-v$version.tar.gz
@@ -39,7 +39,7 @@ Write-Host "[Building Linux + Windows]"
Write-Host -NoNewline "Copying files.........."
ssh $server "rm -rf /tmp/zqwbuild"
ssh $server "mkdir /tmp/zqwbuild"
scp -r src/ singleapplication/ res/ ./zec-qt-wallet.pro ./application.qrc ./LICENSE ./README.md ${server}:/tmp/zqwbuild/ | Out-Null
scp -r src/ singleapplication/ res/ ./hush-qt-wallet.pro ./application.qrc ./LICENSE ./README.md ${server}:/tmp/zqwbuild/ | Out-Null
ssh $server "dos2unix -q /tmp/zqwbuild/src/scripts/mkrelease.sh" | Out-Null
ssh $server "dos2unix -q /tmp/zqwbuild/src/version.h"
Write-Host "[OK]"
@@ -86,11 +86,11 @@ Write-Host "[OK]"
# Finally, test to make sure all files exist
Write-Host -NoNewline "Checking Build........."
if (! (Test-Path ./artifacts/linux-binaries-zecwallet-v$version.tar.gz) -or
! (Test-Path ./artifacts/linux-deb-zecwallet-v$version.deb) -or
! (Test-Path ./artifacts/Windows-binaries-zecwallet-v$version.zip) -or
! (Test-Path ./artifacts/macOS-zecwallet-v$version.dmg) -or
! (Test-Path ./artifacts/Windows-installer-zecwallet-v$version.msi) ) {
if (! (Test-Path ./artifacts/linux-binaries-silentdragon-v$version.tar.gz) -or
! (Test-Path ./artifacts/linux-deb-silentdragon-v$version.deb) -or
! (Test-Path ./artifacts/Windows-binaries-silentdragon-v$version.zip) -or
! (Test-Path ./artifacts/macOS-silentdragon-v$version.dmg) -or
! (Test-Path ./artifacts/Windows-installer-silentdragon-v$version.msi) ) {
Write-Host "[Error]"
exit 1;
}

View File

@@ -60,14 +60,14 @@ export PATH=$PATH:/usr/local/bin
#Clean
echo -n "Cleaning..............."
make distclean >/dev/null 2>&1
rm -f artifacts/macOS-zecwallet-v$APP_VERSION.dmg
rm -f artifacts/macOS-silentdragon-v$APP_VERSION.dmg
echo "[OK]"
echo -n "Configuring............"
# Build
QT_STATIC=$QT_PATH src/scripts/dotranslations.sh >/dev/null
$QT_PATH/bin/qmake zec-qt-wallet.pro CONFIG+=release >/dev/null
$QT_PATH/bin/qmake hush-qt-wallet.pro CONFIG+=release >/dev/null
echo "[OK]"
@@ -78,27 +78,27 @@ echo "[OK]"
#Qt deploy
echo -n "Deploying.............."
mkdir artifacts >/dev/null 2>&1
rm -f artifcats/zecwallet.dmg >/dev/null 2>&1
rm -f artifcats/silentdragon.dmg >/dev/null 2>&1
rm -f artifacts/rw* >/dev/null 2>&1
cp $ZCASH_DIR/src/zcashd zecwallet.app/Contents/MacOS/
cp $ZCASH_DIR/src/zcash-cli zecwallet.app/Contents/MacOS/
$QT_PATH/bin/macdeployqt zecwallet.app
cp $ZCASH_DIR/src/zcashd silentdragon.app/Contents/MacOS/
cp $ZCASH_DIR/src/zcash-cli silentdragon.app/Contents/MacOS/
$QT_PATH/bin/macdeployqt silentdragon.app
echo "[OK]"
echo -n "Building dmg..........."
mv zecwallet.app ZecWallet.app
create-dmg --volname "ZecWallet-v$APP_VERSION" --volicon "res/logo.icns" --window-pos 200 120 --icon "ZecWallet.app" 200 190 --app-drop-link 600 185 --hide-extension "ZecWallet.app" --window-size 800 400 --hdiutil-quiet --background res/dmgbg.png artifacts/macOS-zecwallet-v$APP_VERSION.dmg ZecWallet.app >/dev/null 2>&1
mv silentdragon.app silentdragon.app
create-dmg --volname "silentdragon-v$APP_VERSION" --volicon "res/logo.icns" --window-pos 200 120 --icon "silentdragon.app" 200 190 --app-drop-link 600 185 --hide-extension "silentdragon.app" --window-size 800 400 --hdiutil-quiet --background res/dmgbg.png artifacts/macOS-silentdragon-v$APP_VERSION.dmg silentdragon.app >/dev/null 2>&1
#mkdir bin/dmgbuild >/dev/null 2>&1
#sed "s/RELEASE_VERSION/${APP_VERSION}/g" res/appdmg.json > bin/dmgbuild/appdmg.json
#cp res/logo.icns bin/dmgbuild/
#cp res/dmgbg.png bin/dmgbuild/
#cp -r zecwallet.app bin/dmgbuild/
#cp -r silentdragon.app bin/dmgbuild/
#appdmg --quiet bin/dmgbuild/appdmg.json artifacts/macOS-zecwallet-v$APP_VERSION.dmg >/dev/null
if [ ! -f artifacts/macOS-zecwallet-v$APP_VERSION.dmg ]; then
#appdmg --quiet bin/dmgbuild/appdmg.json artifacts/macOS-silentdragon-v$APP_VERSION.dmg >/dev/null
if [ ! -f artifacts/macOS-silentdragon-v$APP_VERSION.dmg ]; then
echo "[ERROR]"
exit 1
fi

View File

@@ -43,7 +43,7 @@ fi
echo -n "Version files.........."
# Replace the version number in the .pro file so it gets picked up everywhere
sed -i "s/${PREV_VERSION}/${APP_VERSION}/g" zec-qt-wallet.pro > /dev/null
sed -i "s/${PREV_VERSION}/${APP_VERSION}/g" hush-qt-wallet.pro > /dev/null
# Also update it in the README.md
sed -i "s/${PREV_VERSION}/${APP_VERSION}/g" README.md > /dev/null
@@ -60,13 +60,13 @@ echo "[Building on" `lsb_release -r`"]"
echo -n "Configuring............"
QT_STATIC=$QT_STATIC bash src/scripts/dotranslations.sh >/dev/null
$QT_STATIC/bin/qmake zec-qt-wallet.pro -spec linux-clang CONFIG+=release > /dev/null
$QT_STATIC/bin/qmake hush-qt-wallet.pro -spec linux-clang CONFIG+=release > /dev/null
echo "[OK]"
echo -n "Building..............."
rm -rf bin/zec-qt-wallet* > /dev/null
rm -rf bin/zecwallet* > /dev/null
rm -rf bin/hush-qt-wallet* > /dev/null
rm -rf bin/silentdragon* > /dev/null
make clean > /dev/null
make -j$(nproc) > /dev/null
echo "[OK]"
@@ -74,7 +74,7 @@ echo "[OK]"
# Test for Qt
echo -n "Static link............"
if [[ $(ldd zecwallet | grep -i "Qt") ]]; then
if [[ $(ldd silentdragon | grep -i "Qt") ]]; then
echo "FOUND QT; ABORT";
exit 1
fi
@@ -82,27 +82,27 @@ echo "[OK]"
echo -n "Packaging.............."
mkdir bin/zecwallet-v$APP_VERSION > /dev/null
strip zecwallet
mkdir bin/silentdragon-v$APP_VERSION > /dev/null
strip silentdragon
cp zecwallet bin/zecwallet-v$APP_VERSION > /dev/null
cp $ZCASH_DIR/artifacts/zcashd bin/zecwallet-v$APP_VERSION > /dev/null
cp $ZCASH_DIR/artifacts/zcash-cli bin/zecwallet-v$APP_VERSION > /dev/null
cp README.md bin/zecwallet-v$APP_VERSION > /dev/null
cp LICENSE bin/zecwallet-v$APP_VERSION > /dev/null
cp silentdragon bin/silentdragon-v$APP_VERSION > /dev/null
cp $ZCASH_DIR/artifacts/zcashd bin/silentdragon-v$APP_VERSION > /dev/null
cp $ZCASH_DIR/artifacts/zcash-cli bin/silentdragon-v$APP_VERSION > /dev/null
cp README.md bin/silentdragon-v$APP_VERSION > /dev/null
cp LICENSE bin/silentdragon-v$APP_VERSION > /dev/null
cd bin && tar czf linux-zecwallet-v$APP_VERSION.tar.gz zecwallet-v$APP_VERSION/ > /dev/null
cd bin && tar czf linux-silentdragon-v$APP_VERSION.tar.gz silentdragon-v$APP_VERSION/ > /dev/null
cd ..
mkdir artifacts >/dev/null 2>&1
cp bin/linux-zecwallet-v$APP_VERSION.tar.gz ./artifacts/linux-binaries-zecwallet-v$APP_VERSION.tar.gz
cp bin/linux-silentdragon-v$APP_VERSION.tar.gz ./artifacts/linux-binaries-silentdragon-v$APP_VERSION.tar.gz
echo "[OK]"
if [ -f artifacts/linux-binaries-zecwallet-v$APP_VERSION.tar.gz ] ; then
if [ -f artifacts/linux-binaries-silentdragon-v$APP_VERSION.tar.gz ] ; then
echo -n "Package contents......."
# Test if the package is built OK
if tar tf "artifacts/linux-binaries-zecwallet-v$APP_VERSION.tar.gz" | wc -l | grep -q "6"; then
if tar tf "artifacts/linux-binaries-silentdragon-v$APP_VERSION.tar.gz" | wc -l | grep -q "6"; then
echo "[OK]"
else
echo "[ERROR]"
@@ -114,24 +114,24 @@ else
fi
echo -n "Building deb..........."
debdir=bin/deb/zecwallet-v$APP_VERSION
debdir=bin/deb/silentdragon-v$APP_VERSION
mkdir -p $debdir > /dev/null
mkdir $debdir/DEBIAN
mkdir -p $debdir/usr/local/bin
cat src/scripts/control | sed "s/RELEASE_VERSION/$APP_VERSION/g" > $debdir/DEBIAN/control
cp zecwallet $debdir/usr/local/bin/
cp silentdragon $debdir/usr/local/bin/
cp $ZCASH_DIR/artifacts/zcashd $debdir/usr/local/bin/zqw-zcashd
mkdir -p $debdir/usr/share/pixmaps/
cp res/zecwallet.xpm $debdir/usr/share/pixmaps/
cp res/silentdragon.xpm $debdir/usr/share/pixmaps/
mkdir -p $debdir/usr/share/applications
cp src/scripts/desktopentry $debdir/usr/share/applications/zec-qt-wallet.desktop
cp src/scripts/desktopentry $debdir/usr/share/applications/hush-qt-wallet.desktop
dpkg-deb --build $debdir >/dev/null
cp $debdir.deb artifacts/linux-deb-zecwallet-v$APP_VERSION.deb
cp $debdir.deb artifacts/linux-deb-silentdragon-v$APP_VERSION.deb
echo "[OK]"
@@ -160,36 +160,36 @@ export PATH=$MXE_PATH:$PATH
echo -n "Configuring............"
make clean > /dev/null
rm -f zec-qt-wallet-mingw.pro
rm -f hush-qt-wallet-mingw.pro
rm -rf release/
#Mingw seems to have trouble with precompiled headers, so strip that option from the .pro file
cat zec-qt-wallet.pro | sed "s/precompile_header/release/g" | sed "s/PRECOMPILED_HEADER.*//g" > zec-qt-wallet-mingw.pro
cat hush-qt-wallet.pro | sed "s/precompile_header/release/g" | sed "s/PRECOMPILED_HEADER.*//g" > hush-qt-wallet-mingw.pro
echo "[OK]"
echo -n "Building..............."
x86_64-w64-mingw32.static-qmake-qt5 zec-qt-wallet-mingw.pro CONFIG+=release > /dev/null
x86_64-w64-mingw32.static-qmake-qt5 hush-qt-wallet-mingw.pro CONFIG+=release > /dev/null
make -j32 > /dev/null
echo "[OK]"
echo -n "Packaging.............."
mkdir release/zecwallet-v$APP_VERSION
cp release/zecwallet.exe release/zecwallet-v$APP_VERSION
cp $ZCASH_DIR/artifacts/zcashd.exe release/zecwallet-v$APP_VERSION > /dev/null
cp $ZCASH_DIR/artifacts/zcash-cli.exe release/zecwallet-v$APP_VERSION > /dev/null
cp README.md release/zecwallet-v$APP_VERSION
cp LICENSE release/zecwallet-v$APP_VERSION
cd release && zip -r Windows-binaries-zecwallet-v$APP_VERSION.zip zecwallet-v$APP_VERSION/ > /dev/null
mkdir release/silentdragon-v$APP_VERSION
cp release/silentdragon.exe release/silentdragon-v$APP_VERSION
cp $ZCASH_DIR/artifacts/zcashd.exe release/silentdragon-v$APP_VERSION > /dev/null
cp $ZCASH_DIR/artifacts/zcash-cli.exe release/silentdragon-v$APP_VERSION > /dev/null
cp README.md release/silentdragon-v$APP_VERSION
cp LICENSE release/silentdragon-v$APP_VERSION
cd release && zip -r Windows-binaries-silentdragon-v$APP_VERSION.zip silentdragon-v$APP_VERSION/ > /dev/null
cd ..
mkdir artifacts >/dev/null 2>&1
cp release/Windows-binaries-zecwallet-v$APP_VERSION.zip ./artifacts/
cp release/Windows-binaries-silentdragon-v$APP_VERSION.zip ./artifacts/
echo "[OK]"
if [ -f artifacts/Windows-binaries-zecwallet-v$APP_VERSION.zip ] ; then
if [ -f artifacts/Windows-binaries-silentdragon-v$APP_VERSION.zip ] ; then
echo -n "Package contents......."
if unzip -l "artifacts/Windows-binaries-zecwallet-v$APP_VERSION.zip" | wc -l | grep -q "11"; then
if unzip -l "artifacts/Windows-binaries-silentdragon-v$APP_VERSION.zip" | wc -l | grep -q "11"; then
echo "[OK]"
else
echo "[ERROR]"

View File

@@ -2,28 +2,28 @@ param (
[Parameter(Mandatory=$true)][string]$version
)
$target="zecwallet-v$version"
$target="silentdragon-v$version"
Remove-Item -Path release/wininstaller -Recurse -ErrorAction Ignore | Out-Null
New-Item release/wininstaller -itemtype directory | Out-Null
Copy-Item release/$target/zecwallet.exe release/wininstaller/
Copy-Item release/$target/silentdragon.exe release/wininstaller/
Copy-Item release/$target/LICENSE release/wininstaller/
Copy-Item release/$target/README.md release/wininstaller/
Copy-Item release/$target/zcashd.exe release/wininstaller/
Copy-Item release/$target/zcash-cli.exe release/wininstaller/
Get-Content src/scripts/zec-qt-wallet.wxs | ForEach-Object { $_ -replace "RELEASE_VERSION", "$version" } | Out-File -Encoding utf8 release/wininstaller/zec-qt-wallet.wxs
Get-Content src/scripts/hush-qt-wallet.wxs | ForEach-Object { $_ -replace "RELEASE_VERSION", "$version" } | Out-File -Encoding utf8 release/wininstaller/hush-qt-wallet.wxs
candle.exe release/wininstaller/zec-qt-wallet.wxs -o release/wininstaller/zec-qt-wallet.wixobj
candle.exe release/wininstaller/hush-qt-wallet.wxs -o release/wininstaller/hush-qt-wallet.wixobj
if (!$?) {
exit 1;
}
light.exe -ext WixUIExtension -cultures:en-us release/wininstaller/zec-qt-wallet.wixobj -out release/wininstaller/zecwallet.msi
light.exe -ext WixUIExtension -cultures:en-us release/wininstaller/hush-qt-wallet.wixobj -out release/wininstaller/silentdragon.msi
if (!$?) {
exit 1;
}
New-Item artifacts -itemtype directory -Force | Out-Null
Copy-Item release/wininstaller/zecwallet.msi ./artifacts/Windows-installer-$target.msi
Copy-Item release/wininstaller/silentdragon.msi ./artifacts/Windows-installer-$target.msi

View File

@@ -35,7 +35,7 @@ rm -f signatures-v$APP_VERSION.tar.gz
# sha256sum the binaries
gsha256sum *$APP_VERSION* > sha256sum-v$APP_VERSION.txt
for i in $( ls *zecwallet-v$APP_VERSION* sha256sum-v$APP_VERSION* ); do
for i in $( ls *silentdragon-v$APP_VERSION* sha256sum-v$APP_VERSION* ); do
echo "Signing" $i
gpg --batch --output ../release/signatures/$i.sig --detach-sig $i
done

View File

@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="ZecWallet vRELEASE_VERSION" Language="1033" Version="RELEASE_VERSION" Manufacturer="zec-qt-wallet-org" UpgradeCode="fb9bf166-b55f-46b5-a990-9189bdf64533">
<Product Id="*" Name="silentdragon vRELEASE_VERSION" Language="1033" Version="RELEASE_VERSION" Manufacturer="hush-qt-wallet-org" UpgradeCode="fb9bf166-b55f-46b5-a990-9189bdf64533">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes"/>
<Icon Id="zecqtwalleticon.exe" SourceFile="res/icon.ico"/>
<Property Id="ARPPRODUCTICON" Value="zecqtwalleticon.exe" />
<Icon Id="hushqtwalleticon.exe" SourceFile="res/icon.ico"/>
<Property Id="ARPPRODUCTICON" Value="hushqtwalleticon.exe" />
<Feature Id="ProductFeature" Title="zec-qt-wallet" Level="1">
<Feature Id="ProductFeature" Title="hush-qt-wallet" Level="1">
<ComponentGroupRef Id="ProductComponents" />
<ComponentRef Id="ProgramMenuDir"/>
</Feature>
@@ -37,13 +37,13 @@
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="zec-qt-wallet" />
<Directory Id="INSTALLFOLDER" Name="hush-qt-wallet" />
</Directory>
<Directory Id="ProgramMenuFolder" Name="Programs">
<Directory Id="ApplicationProgramsFolder" Name="zec-qt-wallet">
<Directory Id="ApplicationProgramsFolder" Name="hush-qt-wallet">
<Component Id="ProgramMenuDir" Guid="0D560F5A-53E0-4E7E-ADDA-15A26995505E">
<RemoveFolder Id="ProgramMenuDir" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\zec-qt-wallet\WixSetup"
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\hush-qt-wallet\WixSetup"
Type="integer" Value="1" Name="installed" KeyPath="yes" />
</Component>
</Directory>
@@ -55,9 +55,9 @@
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="ProductComponent" Guid="0D210F5A-53E0-4E7E-CAAD-15A26995505E">
<File Source="zecwallet.exe" KeyPath="yes">
<File Source="silentdragon.exe" KeyPath="yes">
<Shortcut Id="startMenuShotcut" Advertise="yes" Directory="ApplicationProgramsFolder"
Name="ZecWallet" WorkingDirectory="INSTALLFOLDER" Icon="zecqtwalleticon.exe" >
Name="silentdragon" WorkingDirectory="INSTALLFOLDER" Icon="hushqtwalleticon.exe" >
</Shortcut>
</File>
<File Source="LICENSE" />
@@ -69,10 +69,10 @@
<RegistryValue Type="string" Name="URL Protocol" Value=""/>
<RegistryValue Type="string" Value="URL:zcash URI protocol"/>
<RegistryKey Key="DefaultIcon">
<RegistryValue Type="string" Value="zecwallet.exe" />
<RegistryValue Type="string" Value="silentdragon.exe" />
</RegistryKey>
<RegistryKey Key="shell\open\command">
<RegistryValue Type="string" Value="&quot;[INSTALLFOLDER]zecwallet.exe&quot; &quot;%1&quot;" />
<RegistryValue Type="string" Value="&quot;[INSTALLFOLDER]silentdragon.exe&quot; &quot;%1&quot;" />
</RegistryKey>
</RegistryKey>
</Component>

View File

@@ -62,7 +62,7 @@ void MainWindow::setupSendTab() {
// Disable custom fees if settings say no
ui->minerFeeAmt->setReadOnly(!Settings::getInstance()->getAllowCustomFees());
QObject::connect(ui->minerFeeAmt, &QLineEdit::textChanged, [=](auto txt) {
ui->lblMinerFeeUSD->setText(Settings::getUSDFromZecAmount(txt.toDouble()));
ui->lblMinerFeeUSD->setText(Settings::getUSDFromhushAmount(txt.toDouble()));
});
ui->minerFeeAmt->setText(Settings::getDecimalString(Settings::getMinerFee()));
@@ -70,7 +70,7 @@ void MainWindow::setupSendTab() {
QObject::connect(ui->tabWidget, &QTabWidget::currentChanged, [=] (int pos) {
if (pos == 1) {
QString txt = ui->minerFeeAmt->text();
ui->lblMinerFeeUSD->setText(Settings::getUSDFromZecAmount(txt.toDouble()));
ui->lblMinerFeeUSD->setText(Settings::getUSDFromhushAmount(txt.toDouble()));
}
});
@@ -225,10 +225,10 @@ void MainWindow::updateFromCombo() {
void MainWindow::inputComboTextChanged(int index) {
auto addr = ui->inputsCombo->itemText(index);
auto bal = rpc->getModel()->getAllBalances().value(addr);
auto balFmt = Settings::getZECDisplayFormat(bal);
auto balFmt = Settings::gethushDisplayFormat(bal);
ui->sendAddressBalance->setText(balFmt);
ui->sendAddressBalanceUSD->setText(Settings::getUSDFromZecAmount(bal));
ui->sendAddressBalanceUSD->setText(Settings::getUSDFromhushAmount(bal));
}
@@ -341,7 +341,7 @@ void MainWindow::addressChanged(int itemNumber, const QString& text) {
void MainWindow::amountChanged(int item, const QString& text) {
auto usd = ui->sendToWidgets->findChild<QLabel*>(QString("AmtUSD") % QString::number(item));
usd->setText(Settings::getUSDFromZecAmount(text.toDouble()));
usd->setText(Settings::getUSDFromhushAmount(text.toDouble()));
// If there is a recurring payment, update the info there as well
if (sendTxRecurringInfo != nullptr) {
@@ -633,10 +633,10 @@ bool MainWindow::confirmTx(Tx tx, RecurringPaymentInfo* rpi) {
Addr->setFont(fixedFont);
confirm.gridLayout->addWidget(Addr, row, 0, 1, 1);
// Amount (ZEC)
// Amount (hush)
auto Amt = new QLabel(confirm.sendToAddrs);
Amt->setObjectName(QString("Amt") % QString::number(i + 1));
Amt->setText(Settings::getZECDisplayFormat(toAddr.amount));
Amt->setText(Settings::gethushDisplayFormat(toAddr.amount));
Amt->setAlignment(Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter);
confirm.gridLayout->addWidget(Amt, row, 1, 1, 1);
totalSpending += toAddr.amount;
@@ -644,7 +644,7 @@ bool MainWindow::confirmTx(Tx tx, RecurringPaymentInfo* rpi) {
// Amount (USD)
auto AmtUSD = new QLabel(confirm.sendToAddrs);
AmtUSD->setObjectName(QString("AmtUSD") % QString::number(i + 1));
AmtUSD->setText(Settings::getUSDFromZecAmount(toAddr.amount));
AmtUSD->setText(Settings::getUSDFromhushAmount(toAddr.amount));
AmtUSD->setAlignment(Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter);
confirm.gridLayout->addWidget(AmtUSD, row, 2, 1, 1);
@@ -686,7 +686,7 @@ bool MainWindow::confirmTx(Tx tx, RecurringPaymentInfo* rpi) {
minerFee->setObjectName(QStringLiteral("minerFee"));
minerFee->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
confirm.gridLayout->addWidget(minerFee, row, 1, 1, 1);
minerFee->setText(Settings::getZECDisplayFormat(tx.fee));
minerFee->setText(Settings::gethushDisplayFormat(tx.fee));
totalSpending += tx.fee;
auto minerFeeUSD = new QLabel(confirm.sendToAddrs);
@@ -695,7 +695,7 @@ bool MainWindow::confirmTx(Tx tx, RecurringPaymentInfo* rpi) {
minerFeeUSD->setObjectName(QStringLiteral("minerFeeUSD"));
minerFeeUSD->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
confirm.gridLayout->addWidget(minerFeeUSD, row, 2, 1, 1);
minerFeeUSD->setText(Settings::getUSDFromZecAmount(tx.fee));
minerFeeUSD->setText(Settings::getUSDFromhushAmount(tx.fee));
if (Settings::getInstance()->getAllowCustomFees() && tx.fee != Settings::getMinerFee()) {
confirm.warningLabel->setVisible(true);
@@ -724,9 +724,9 @@ bool MainWindow::confirmTx(Tx tx, RecurringPaymentInfo* rpi) {
confirm.sendFrom->setText(fnSplitAddressForWrap(tx.fromAddr));
confirm.sendFrom->setFont(fixedFont);
QString tooltip = tr("Current balance : ") +
Settings::getZECUSDDisplayFormat(rpc->getModel()->getAllBalances().value(tx.fromAddr));
Settings::gethushUSDDisplayFormat(rpc->getModel()->getAllBalances().value(tx.fromAddr));
tooltip += "\n" + tr("Balance after this Tx: ") +
Settings::getZECUSDDisplayFormat(rpc->getModel()->getAllBalances().value(tx.fromAddr) - totalSpending);
Settings::gethushUSDDisplayFormat(rpc->getModel()->getAllBalances().value(tx.fromAddr) - totalSpending);
confirm.sendFrom->setToolTip(tooltip);
// Show the dialog and submit it if the user confirms

View File

@@ -111,8 +111,8 @@ bool Settings::isSaplingActive() {
(!isTestnet() && getBlockNumber() > 419200);
}
double Settings::getZECPrice() {
return zecPrice;
double Settings::gethushPrice() {
return hushPrice;
}
bool Settings::getAutoShield() {
@@ -197,9 +197,9 @@ void Settings::saveRestoreTableHeader(QTableView* table, QDialog* d, QString tab
void Settings::openAddressInExplorer(QString address) {
QString url;
if (Settings::getInstance()->isTestnet()) {
url = "https://chain.so/address/ZECTEST/" + address;
url = "https://chain.so/address/hushTEST/" + address;
} else {
url = "https://chain.so/address/ZEC/" + address;
url = "https://chain.so/address/hush/" + address;
}
QDesktopServices::openUrl(QUrl(url));
}
@@ -207,10 +207,10 @@ void Settings::openAddressInExplorer(QString address) {
void Settings::openTxInExplorer(QString txid) {
QString url;
if (Settings::getInstance()->isTestnet()) {
url = "https://chain.so/tx/ZECTEST/" + txid;
url = "https://chain.so/tx/hushTEST/" + txid;
}
else {
url = "https://chain.so/tx/ZEC/" + txid;
url = "https://chain.so/tx/hush/" + txid;
}
QDesktopServices::openUrl(QUrl(url));
}
@@ -220,8 +220,8 @@ QString Settings::getUSDFormat(double bal) {
}
QString Settings::getUSDFromZecAmount(double bal) {
return getUSDFormat(bal * Settings::getInstance()->getZECPrice());
QString Settings::getUSDFromhushAmount(double bal) {
return getUSDFormat(bal * Settings::getInstance()->gethushPrice());
}
@@ -237,17 +237,17 @@ QString Settings::getDecimalString(double amt) {
return f;
}
QString Settings::getZECDisplayFormat(double bal) {
QString Settings::gethushDisplayFormat(double bal) {
// This is idiotic. Why doesn't QString have a way to do this?
return getDecimalString(bal) % " " % Settings::getTokenName();
}
QString Settings::getZECUSDDisplayFormat(double bal) {
auto usdFormat = getUSDFromZecAmount(bal);
QString Settings::gethushUSDDisplayFormat(double bal) {
auto usdFormat = getUSDFromhushAmount(bal);
if (!usdFormat.isEmpty())
return getZECDisplayFormat(bal) % " (" % usdFormat % ")";
return gethushDisplayFormat(bal) % " (" % usdFormat % ")";
else
return getZECDisplayFormat(bal);
return gethushDisplayFormat(bal);
}
const QString Settings::txidStatusMessage = QString(QObject::tr("Tx submitted (right click to copy) txid:"));
@@ -256,7 +256,7 @@ QString Settings::getTokenName() {
if (Settings::getInstance()->isTestnet()) {
return "TAZ";
} else {
return "ZEC";
return "HUSH";
}
}
@@ -354,7 +354,7 @@ bool Settings::isValidAddress(QString addr) {
// Get a pretty string representation of this Payment URI
QString Settings::paymentURIPretty(PaymentURI uri) {
return QString() + "Payment Request\n" + "Pay: " + uri.addr + "\nAmount: " + getZECDisplayFormat(uri.amt.toDouble())
return QString() + "Payment Request\n" + "Pay: " + uri.addr + "\nAmount: " + gethushDisplayFormat(uri.amt.toDouble())
+ "\nMemo:" + QUrl::fromPercentEncoding(uri.memo.toUtf8());
}

View File

@@ -77,8 +77,8 @@ public:
void setUsingZcashConf(QString confLocation);
const QString& getZcashdConfLocation() { return _confLocation; }
void setZECPrice(double p) { zecPrice = p; }
double getZECPrice();
void sethushPrice(double p) { hushPrice = p; }
double gethushPrice();
void setPeers(int peers);
int getPeers();
@@ -101,9 +101,9 @@ public:
static QString getDecimalString(double amt);
static QString getUSDFormat(double usdAmt);
static QString getUSDFromZecAmount(double bal);
static QString getZECDisplayFormat(double bal);
static QString getZECUSDDisplayFormat(double bal);
static QString getUSDFromhushAmount(double bal);
static QString gethushDisplayFormat(double bal);
static QString gethushUSDDisplayFormat(double bal);
static QString getTokenName();
static QString getDonationAddr();
@@ -142,7 +142,7 @@ private:
bool _headless = false;
int _peerConnections = 0;
double zecPrice = 0.0;
double hushPrice = 0.0;
};
#endif // SETTINGS_H

View File

@@ -179,7 +179,7 @@
<item row="12" column="0" colspan="2">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Connect to the internet to fetch ZEC prices</string>
<string>Connect to the internet to fetch hush prices</string>
</property>
</widget>
</item>
@@ -283,7 +283,7 @@
<item row="11" column="0" colspan="2">
<widget class="QCheckBox" name="chkFetchPrices">
<property name="text">
<string>Fetch ZEC / USD prices</string>
<string>Fetch hush / USD prices</string>
</property>
</widget>
</item>
@@ -350,7 +350,7 @@
<item row="1" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Rescan the blockchain for any missing wallet transactions and to correct your wallet balance. This may take several hours. You need to restart ZecWallet for this to take effect</string>
<string>Rescan the blockchain for any missing wallet transactions and to correct your wallet balance. This may take several hours. You need to restart silentdragon for this to take effect</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -394,7 +394,7 @@
<item row="6" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Rebuild the entire blockchain from the genesis block, by rescanning all the block files. This may take several hours to days, depending on your hardware. You need to restart ZecWallet for this to take effect</string>
<string>Rebuild the entire blockchain from the genesis block, by rescanning all the block files. This may take several hours to days, depending on your hardware. You need to restart silentdragon for this to take effect</string>
</property>
<property name="wordWrap">
<bool>true</bool>

View File

@@ -109,7 +109,7 @@ bool TxTableModel::exportToCsv(QString fileName) const {
for (int i=0; i < dat.items.length(); i++) {
total += dat.items[i].amount;
}
return Settings::getZECDisplayFormat(total);
return Settings::gethushDisplayFormat(total);
}
}
}
@@ -145,7 +145,7 @@ bool TxTableModel::exportToCsv(QString fileName) const {
for (int i=0; i < dat.items.length(); i++) {
total += dat.items[i].amount;
}
return Settings::getInstance()->getUSDFromZecAmount(total);
return Settings::getInstance()->getUSDFromhushAmount(total);
}
}
}

View File

@@ -112,7 +112,7 @@ void WormholeClient::connect() {
QObject::connect(m_webSocket, &QWebSocket::connected, this, &WormholeClient::onConnected);
QObject::connect(m_webSocket, &QWebSocket::disconnected, this, &WormholeClient::closed);
m_webSocket->open(QUrl("wss://wormhole.zecqtwallet.com:443"));
m_webSocket->open(QUrl("wss://wormhole.hushqtwallet.com:443"));
//m_webSocket->open(QUrl("ws://127.0.0.1:7070"));
}
@@ -356,7 +356,7 @@ QString AppDataServer::connDesc(AppConnectionType t) {
return QObject::tr("Connected directly");
}
else {
return QObject::tr("Connected over the internet via ZecWallet wormhole service");
return QObject::tr("Connected over the internet via silentdragon wormhole service");
}
}
@@ -760,7 +760,7 @@ void AppDataServer::processGetInfo(QJsonObject jobj, MainWindow* mainWindow, std
{"maxspendable", maxSpendable},
{"maxzspendable", maxZSpendable},
{"tokenName", Settings::getTokenName()},
{"zecprice", Settings::getInstance()->getZECPrice()},
{"hushprice", Settings::getInstance()->gethushPrice()},
{"serverversion", QString(APP_VERSION)}
}).toJson();
pClient->sendTextMessage(encryptOutgoing(r));