Merge branch 'master' of github.com:adityapk00/zec-qt-wallet
This commit is contained in:
@@ -9,8 +9,8 @@ Head over to the releases page and grab the latest binary. https://github.com/ad
|
|||||||
### Linux
|
### Linux
|
||||||
Extract and run the binary
|
Extract and run the binary
|
||||||
```
|
```
|
||||||
tar -xvf zec-qt-wallet-v0.2.6.tar.gz
|
tar -xvf zec-qt-wallet-v0.2.7.tar.gz
|
||||||
./zec-qt-wallet-v0.2.6/zec-qt-wallet
|
./zec-qt-wallet-v0.2.7/zec-qt-wallet
|
||||||
```
|
```
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|||||||
BIN
res/icon.ico
BIN
res/icon.ico
Binary file not shown.
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
@@ -40,7 +40,7 @@ void ConnectionLoader::loadConnection() {
|
|||||||
if (config.get() == nullptr) {
|
if (config.get() == nullptr) {
|
||||||
d->show();
|
d->show();
|
||||||
// Nothing configured, show an error
|
// Nothing configured, show an error
|
||||||
auto explanation = QString()
|
QString explanation = QString()
|
||||||
% "A zcash.conf was not found on this machine.\n\n"
|
% "A zcash.conf was not found on this machine.\n\n"
|
||||||
% "If you are connecting to a remote/non-standard node "
|
% "If you are connecting to a remote/non-standard node "
|
||||||
% "please set the host/port and user/password in the File->Settings menu.";
|
% "please set the host/port and user/password in the File->Settings menu.";
|
||||||
@@ -97,11 +97,11 @@ void ConnectionLoader::refreshZcashdState(Connection* connection) {
|
|||||||
|
|
||||||
auto err = reply->error();
|
auto err = reply->error();
|
||||||
// Failed, see what it is.
|
// Failed, see what it is.
|
||||||
qDebug() << err << ":" << QString::fromStdString(res.dump());
|
//qDebug() << err << ":" << QString::fromStdString(res.dump());
|
||||||
|
|
||||||
if (err == QNetworkReply::NetworkError::ConnectionRefusedError) {
|
if (err == QNetworkReply::NetworkError::ConnectionRefusedError) {
|
||||||
auto isZcashConfFound = connection->config.get()->usingZcashConf;
|
auto isZcashConfFound = connection->config.get()->usingZcashConf;
|
||||||
auto explanation = QString()
|
QString explanation = QString()
|
||||||
% (isZcashConfFound ? "A zcash.conf file was found, but a" : "A")
|
% (isZcashConfFound ? "A zcash.conf file was found, but a" : "A")
|
||||||
% " connection to zcashd could not be established.\n\n"
|
% " connection to zcashd could not be established.\n\n"
|
||||||
% "If you are connecting to a remote/non-standard node "
|
% "If you are connecting to a remote/non-standard node "
|
||||||
@@ -109,7 +109,7 @@ void ConnectionLoader::refreshZcashdState(Connection* connection) {
|
|||||||
|
|
||||||
this->showError(explanation);
|
this->showError(explanation);
|
||||||
} else if (err == QNetworkReply::NetworkError::AuthenticationRequiredError) {
|
} else if (err == QNetworkReply::NetworkError::AuthenticationRequiredError) {
|
||||||
auto explanation = QString()
|
QString explanation = QString()
|
||||||
% "Authentication failed. The username / password you specified was "
|
% "Authentication failed. The username / password you specified was "
|
||||||
% "not accepted by zcashd. Try changing it in the File->Settings menu";
|
% "not accepted by zcashd. Try changing it in the File->Settings menu";
|
||||||
|
|
||||||
|
|||||||
@@ -234,21 +234,25 @@ void MainWindow::turnstileDoMigration(QString fromAddr) {
|
|||||||
|
|
||||||
// Privacy level combobox
|
// Privacy level combobox
|
||||||
// Num tx over num blocks
|
// Num tx over num blocks
|
||||||
QList<QPair<int, int>> privOptions;
|
QList<std::tuple<QString, int, int>> privOptions;
|
||||||
privOptions.push_back(QPair<double, double>(3, 6));
|
privOptions.push_back(std::make_tuple<QString, int, int>("Good", 3, 576));
|
||||||
privOptions.push_back(QPair<double, double>(5, 10));
|
privOptions.push_back(std::make_tuple<QString, int, int>("Excellent", 5, 1152));
|
||||||
privOptions.push_back(QPair<double, double>(10, 20));
|
privOptions.push_back(std::make_tuple<QString, int, int>("Paranoid", 10, 2304));
|
||||||
|
|
||||||
QObject::connect(turnstile.privLevel, QOverload<int>::of(&QComboBox::currentIndexChanged), [=] (auto idx) {
|
QObject::connect(turnstile.privLevel, QOverload<int>::of(&QComboBox::currentIndexChanged), [=] (auto idx) {
|
||||||
// Update the fees
|
// Update the fees
|
||||||
turnstile.minerFee->setText(
|
turnstile.minerFee->setText(
|
||||||
Settings::getInstance()->getZECUSDDisplayFormat(privOptions[idx].first * Utils::getMinerFee()));
|
Settings::getInstance()->getZECUSDDisplayFormat(std::get<1>(privOptions[idx]) * Utils::getMinerFee()));
|
||||||
});
|
});
|
||||||
|
|
||||||
turnstile.privLevel->addItem("Good - 3 tx over 6 blocks");
|
for (auto i : privOptions) {
|
||||||
turnstile.privLevel->addItem("Excellent - 5 tx over 10 blocks");
|
turnstile.privLevel->addItem(std::get<0>(i) % " - "
|
||||||
turnstile.privLevel->addItem("Paranoid - 10 tx over 20 blocks");
|
% QString::number(std::get<1>(i)) % " tx over "
|
||||||
|
% QString::number(std::get<2>(i)) % " blocks ("
|
||||||
|
% QString::number((int)(std::get<2>(i) / 24 / 24)) % " days)" // 24 blks/hr * 24 hrs per day
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
turnstile.buttonBox->button(QDialogButtonBox::Ok)->setText("Start");
|
turnstile.buttonBox->button(QDialogButtonBox::Ok)->setText("Start");
|
||||||
|
|
||||||
if (d.exec() == QDialog::Accepted) {
|
if (d.exec() == QDialog::Accepted) {
|
||||||
@@ -256,7 +260,7 @@ void MainWindow::turnstileDoMigration(QString fromAddr) {
|
|||||||
rpc->getTurnstile()->planMigration(
|
rpc->getTurnstile()->planMigration(
|
||||||
turnstile.migrateZaddList->currentText(),
|
turnstile.migrateZaddList->currentText(),
|
||||||
turnstile.migrateTo->currentText(),
|
turnstile.migrateTo->currentText(),
|
||||||
privLevel.first, privLevel.second);
|
std::get<1>(privLevel), std::get<2>(privLevel));
|
||||||
|
|
||||||
QMessageBox::information(this, "Backup your wallet.dat",
|
QMessageBox::information(this, "Backup your wallet.dat",
|
||||||
"The migration will now start. You can check progress in the File -> Sapling Turnstile menu.\n\nYOU MUST BACKUP YOUR wallet.dat NOW!\n\nNew Addresses have been added to your wallet which will be used for the migration.",
|
"The migration will now start. You can check progress in the File -> Sapling Turnstile menu.\n\nYOU MUST BACKUP YOUR wallet.dat NOW!\n\nNew Addresses have been added to your wallet which will be used for the migration.",
|
||||||
@@ -585,7 +589,7 @@ void MainWindow::setupBalancesTab() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Settings::getInstance()->isTestnet() && Settings::getInstance()->isSproutAddress(addr)) {
|
if (Settings::getInstance()->isSproutAddress(addr)) {
|
||||||
menu.addAction("Migrate to Sapling", [=] () {
|
menu.addAction("Migrate to Sapling", [=] () {
|
||||||
this->turnstileDoMigration(addr);
|
this->turnstileDoMigration(addr);
|
||||||
});
|
});
|
||||||
|
|||||||
13
src/rpc.cpp
13
src/rpc.cpp
@@ -68,6 +68,7 @@ void RPC::setConnection(Connection* c) {
|
|||||||
delete conn;
|
delete conn;
|
||||||
this->conn = c;
|
this->conn = c;
|
||||||
|
|
||||||
|
refreshZECPrice();
|
||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -522,14 +523,9 @@ void RPC::refreshAddresses() {
|
|||||||
|
|
||||||
// Function to create the data model and update the views, used below.
|
// Function to create the data model and update the views, used below.
|
||||||
void RPC::updateUI(bool anyUnconfirmed) {
|
void RPC::updateUI(bool anyUnconfirmed) {
|
||||||
if (Settings::getInstance()->isTestnet()) {
|
// See if the turnstile migration has any steps that need to be done.
|
||||||
// See if the turnstile migration has any steps that need to be done.
|
turnstile->executeMigrationStep();
|
||||||
turnstile->executeMigrationStep();
|
|
||||||
} else {
|
|
||||||
// Not available on mainnet yet.
|
|
||||||
main->ui->actionTurnstile_Migration->setVisible(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
ui->unconfirmedWarning->setVisible(anyUnconfirmed);
|
ui->unconfirmedWarning->setVisible(anyUnconfirmed);
|
||||||
|
|
||||||
// Update balances model data, which will update the table too
|
// Update balances model data, which will update the table too
|
||||||
@@ -759,6 +755,7 @@ void RPC::watchTxStatus() {
|
|||||||
|
|
||||||
// Get the ZEC->USD price from coinmarketcap using their API
|
// Get the ZEC->USD price from coinmarketcap using their API
|
||||||
void RPC::refreshZECPrice() {
|
void RPC::refreshZECPrice() {
|
||||||
|
qDebug() << QString::fromStdString("Getting zec price");
|
||||||
if (conn == nullptr)
|
if (conn == nullptr)
|
||||||
return noConnection();
|
return noConnection();
|
||||||
|
|
||||||
|
|||||||
@@ -121,7 +121,8 @@ void Turnstile::planMigration(QString zaddr, QString destAddr, int numsplits, in
|
|||||||
if (migItems.size() == 0) {
|
if (migItems.size() == 0) {
|
||||||
// Show error and abort
|
// Show error and abort
|
||||||
QMessageBox::warning(mainwindow,
|
QMessageBox::warning(mainwindow,
|
||||||
"Locked funds", "Could not initiate migration.\nYou either have unconfirmed funds or the balance is too low for an automatic migration.");
|
"Locked funds",
|
||||||
|
"Could not initiate migration.\nYou either have unconfirmed funds or the balance is too low for an automatic migration.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ PRECOMPILED_HEADER = src/precompiled.h
|
|||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
|
|
||||||
TARGET = zec-qt-wallet
|
TARGET = zec-qt-wallet
|
||||||
APP_VERSION=\\\"0.2.6\\\"
|
APP_VERSION=\\\"0.2.7\\\"
|
||||||
|
|
||||||
|
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
|
|||||||
Reference in New Issue
Block a user