Browse Source

HUSH

pull/81/head
Duke Leto 2 years ago
parent
commit
7275099e3b
  1. 2
      src/mainwindow.cpp
  2. 4
      src/sendtab.cpp
  3. 2
      src/settings.cpp
  4. 2
      src/settings.h

2
src/mainwindow.cpp

@ -1655,7 +1655,7 @@ void MainWindow::setupReceiveTab() {
}
ui->rcvLabel->setText(label);
ui->rcvBal->setText(Settings::getZECUSDDisplayFormat(rpc->getAllBalances()->value(addr)));
ui->rcvBal->setText(Settings::getHUSHUSDDisplayFormat(rpc->getAllBalances()->value(addr)));
ui->txtReceive->setPlainText(addr);
ui->qrcodeDisplay->setQrcodeString(addr);
if (rpc->getUsedAddresses()->value(addr, false)) {

4
src/sendtab.cpp

@ -663,9 +663,9 @@ bool MainWindow::confirmTx(Tx tx) {
// And FromAddress in the confirm dialog
confirm.sendFrom->setText(fnSplitAddressForWrap(tx.fromAddr));
QString tooltip = tr("Current balance : ") +
Settings::getZECUSDDisplayFormat(rpc->getAllBalances()->value(tx.fromAddr));
Settings::getHUSHUSDDisplayFormat(rpc->getAllBalances()->value(tx.fromAddr));
tooltip += "\n" + tr("Balance after this Tx: ") +
Settings::getZECUSDDisplayFormat(rpc->getAllBalances()->value(tx.fromAddr) - totalSpending);
Settings::getHUSHUSDDisplayFormat(rpc->getAllBalances()->value(tx.fromAddr) - totalSpending);
confirm.sendFrom->setToolTip(tooltip);
// Show the dialog and submit it if the user confirms

2
src/settings.cpp

@ -302,7 +302,7 @@ QString Settings::getDisplayFormat(double bal) {
return getDecimalString(bal) % " " % Settings::getTokenName();
}
QString Settings::getZECUSDDisplayFormat(double bal) {
QString Settings::getHUSHUSDDisplayFormat(double bal) {
auto usdFormat = getUSDFormat(bal);
if (!usdFormat.isEmpty())
return getDisplayFormat(bal) % " (" % getUSDFormat(bal) % ")";

2
src/settings.h

@ -123,7 +123,7 @@ public:
static QString getDecimalString(double amt);
static QString getUSDFormat(double bal);
static QString getDisplayFormat(double bal);
static QString getZECUSDDisplayFormat(double bal);
static QString getHUSHUSDDisplayFormat(double bal);
static QString getTokenName();
static QString getDonationAddr();

Loading…
Cancel
Save