|
@ -346,8 +346,8 @@ void MainWindow::setupSettingsModal() { |
|
|
|
|
|
|
|
|
bool isUsingConsolidation = false; |
|
|
bool isUsingConsolidation = false; |
|
|
int size = 0; |
|
|
int size = 0; |
|
|
QDir zcashdir(rpc->getConnection()->config->zcashDir); |
|
|
QDir hushdir(rpc->getConnection()->config->zcashDir); |
|
|
QFile WalletSize(zcashdir.filePath("wallet.dat")); |
|
|
QFile WalletSize(hushdir.filePath("wallet.dat")); |
|
|
if (WalletSize.open(QIODevice::ReadOnly)){ |
|
|
if (WalletSize.open(QIODevice::ReadOnly)){ |
|
|
size = WalletSize.size() / 1000000; //when file does open.
|
|
|
size = WalletSize.size() / 1000000; //when file does open.
|
|
|
//QString size1 = QString::number(size) ;
|
|
|
//QString size1 = QString::number(size) ;
|
|
@ -837,15 +837,15 @@ void MainWindow::backupWalletDat() { |
|
|
if (!rpc->getConnection()) |
|
|
if (!rpc->getConnection()) |
|
|
return; |
|
|
return; |
|
|
|
|
|
|
|
|
QDir zcashdir(rpc->getConnection()->config->zcashDir); |
|
|
QDir hushdir(rpc->getConnection()->config->zcashDir); |
|
|
QString backupDefaultName = "hush-wallet-backup-" + QDateTime::currentDateTime().toString("yyyyMMdd") + ".dat"; |
|
|
QString backupDefaultName = "hush-wallet-backup-" + QDateTime::currentDateTime().toString("yyyyMMdd") + ".dat"; |
|
|
|
|
|
|
|
|
if (Settings::getInstance()->isTestnet()) { |
|
|
if (Settings::getInstance()->isTestnet()) { |
|
|
zcashdir.cd("testnet3"); |
|
|
hushdir.cd("testnet3"); |
|
|
backupDefaultName = "testnet-" + backupDefaultName; |
|
|
backupDefaultName = "testnet-" + backupDefaultName; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
QFile wallet(zcashdir.filePath("wallet.dat")); |
|
|
QFile wallet(hushdir.filePath("wallet.dat")); |
|
|
if (!wallet.exists()) { |
|
|
if (!wallet.exists()) { |
|
|
QMessageBox::critical(this, tr("No wallet.dat"), tr("Couldn't find the wallet.dat on this computer") + "\n" + |
|
|
QMessageBox::critical(this, tr("No wallet.dat"), tr("Couldn't find the wallet.dat on this computer") + "\n" + |
|
|
tr("You need to back it up from the machine hushd is running on"), QMessageBox::Ok); |
|
|
tr("You need to back it up from the machine hushd is running on"), QMessageBox::Ok); |
|
|