|
|
@ -1071,10 +1071,15 @@ void MainWindow::importPrivKey() { |
|
|
|
*/ |
|
|
|
void MainWindow::exportTransactions() { |
|
|
|
// First, get the export file name
|
|
|
|
QString exportName = "hush-transactions-" + QDateTime::currentDateTime().toString("yyyyMMdd") + ".csv"; |
|
|
|
QDir docsDir(QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)); |
|
|
|
QUrl pName = QUrl::fromLocalFile(docsDir.filePath(exportName)); |
|
|
|
QUrl csvName = QFileDialog::getSaveFileUrl(this, tr("Export transactions"), pName, "CSV file (*.csv)"); |
|
|
|
if(isdragonx){ |
|
|
|
QString exportName = "drgx-transactions-" + QDateTime::currentDateTime().toString("yyyyMMdd") + ".csv"; |
|
|
|
}else{ |
|
|
|
QString exportName = "hush-transactions-" + QDateTime::currentDateTime().toString("yyyyMMdd") + ".csv"; |
|
|
|
} |
|
|
|
|
|
|
|
QDir docsDir(QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)); |
|
|
|
QUrl pName = QUrl::fromLocalFile(docsDir.filePath(exportName)); |
|
|
|
QUrl csvName = QFileDialog::getSaveFileUrl(this, tr("Export transactions"), pName, "CSV file (*.csv)"); |
|
|
|
|
|
|
|
if (csvName.isEmpty()) |
|
|
|
return; |
|
|
@ -1094,7 +1099,12 @@ void MainWindow::backupWalletDat() { |
|
|
|
return; |
|
|
|
|
|
|
|
QDir hushdir(rpc->getConnection()->config->hushDir); |
|
|
|
QString backupDefaultName = "hush-wallet-backup-" + QDateTime::currentDateTime().toString("yyyyMMdd") + ".dat"; |
|
|
|
|
|
|
|
if(isdragonx){ |
|
|
|
QString backupDefaultName = "drgx-wallet-backup-" + QDateTime::currentDateTime().toString("yyyyMMdd") + ".dat"; |
|
|
|
}else{ |
|
|
|
QString backupDefaultName = "hush-wallet-backup-" + QDateTime::currentDateTime().toString("yyyyMMdd") + ".dat"; |
|
|
|
} |
|
|
|
|
|
|
|
if (Settings::getInstance()->isTestnet()) { |
|
|
|
hushdir.cd("testnet3"); |
|
|
|