|
|
@ -420,11 +420,12 @@ void MainWindow::setupStatusBar() { |
|
|
|
}); |
|
|
|
menu.addAction("View tx on block explorer", [=]() { |
|
|
|
QString url; |
|
|
|
auto explorer = Settings::getInstance()->getExplorer(); |
|
|
|
if (Settings::getInstance()->isTestnet()) { |
|
|
|
url = "https://explorer.testnet.z.cash/tx/" + txid; |
|
|
|
url = explorer.testnetTxExplorerUrl + txid; |
|
|
|
} |
|
|
|
else { |
|
|
|
url = "https://explorer.myhush.org/tx/" + txid; |
|
|
|
url = explorer.txExplorerUrl + txid; |
|
|
|
} |
|
|
|
QDesktopServices::openUrl(QUrl(url)); |
|
|
|
}); |
|
|
@ -517,6 +518,7 @@ void MainWindow::setupSettingsModal() { |
|
|
|
settings.rpcpassword->setEnabled(true); |
|
|
|
} |
|
|
|
|
|
|
|
// Load current values into the dialog
|
|
|
|
// Load current values into the dialog
|
|
|
|
auto conf = Settings::getInstance()->getSettings(); |
|
|
|
settings.hostname->setText(conf.host); |
|
|
@ -524,6 +526,13 @@ void MainWindow::setupSettingsModal() { |
|
|
|
settings.rpcuser->setText(conf.rpcuser); |
|
|
|
settings.rpcpassword->setText(conf.rpcpassword); |
|
|
|
|
|
|
|
// Load current explorer values into the dialog
|
|
|
|
auto explorer = Settings::getInstance()->getExplorer(); |
|
|
|
settings.txExplorerUrl->setText(explorer.txExplorerUrl); |
|
|
|
settings.addressExplorerUrl->setText(explorer.addressExplorerUrl); |
|
|
|
settings.testnetTxExplorerUrl->setText(explorer.testnetTxExplorerUrl); |
|
|
|
settings.testnetAddressExplorerUrl->setText(explorer.testnetAddressExplorerUrl); |
|
|
|
|
|
|
|
// Connection tab by default
|
|
|
|
settings.tabWidget->setCurrentIndex(0); |
|
|
|
|
|
|
@ -585,6 +594,13 @@ void MainWindow::setupSettingsModal() { |
|
|
|
cl->loadConnection(); |
|
|
|
} |
|
|
|
|
|
|
|
// Save explorer
|
|
|
|
Settings::getInstance()->saveExplorer( |
|
|
|
settings.txExplorerUrl->text(), |
|
|
|
settings.addressExplorerUrl->text(), |
|
|
|
settings.testnetTxExplorerUrl->text(), |
|
|
|
settings.testnetAddressExplorerUrl->text()); |
|
|
|
|
|
|
|
// Check to see if rescan or reindex have been enabled
|
|
|
|
bool showRestartInfo = false; |
|
|
|
if (settings.chkRescan->isChecked()) { |
|
|
@ -1170,11 +1186,12 @@ void MainWindow::setupBalancesTab() { |
|
|
|
|
|
|
|
menu.addAction(tr("View on block explorer"), [=] () { |
|
|
|
QString url; |
|
|
|
auto explorer = Settings::getInstance()->getExplorer(); |
|
|
|
if (Settings::getInstance()->isTestnet()) { |
|
|
|
//TODO
|
|
|
|
url = "https://explorer.testnet.myhush.org/address/" + addr; |
|
|
|
url = explorer.testnetAddressExplorerUrl + addr; |
|
|
|
} else { |
|
|
|
url = "https://explorer.myhush.org/address/" + addr; |
|
|
|
url = explorer.addressExplorerUrl + addr; |
|
|
|
} |
|
|
|
QDesktopServices::openUrl(QUrl(url)); |
|
|
|
}); |
|
|
@ -1250,10 +1267,11 @@ void MainWindow::setupTransactionsTab() { |
|
|
|
|
|
|
|
menu.addAction(tr("View on block explorer"), [=] () { |
|
|
|
QString url; |
|
|
|
auto explorer = Settings::getInstance()->getExplorer(); |
|
|
|
if (Settings::getInstance()->isTestnet()) { |
|
|
|
url = "https://explorer.testnet.myhush.org/tx/" + txid; |
|
|
|
url = explorer.testnetTxExplorerUrl + txid; |
|
|
|
} else { |
|
|
|
url = "https://explorer.myhush.org/tx/" + txid; |
|
|
|
url = explorer.txExplorerUrl + txid; |
|
|
|
} |
|
|
|
QDesktopServices::openUrl(QUrl(url)); |
|
|
|
}); |
|
|
|