Fix from fields in confirm dialog

This commit is contained in:
Aditya Kulkarni
2019-10-27 12:17:14 -07:00
parent 3ceb2443a3
commit 167cfc8bd5
3 changed files with 1 additions and 31 deletions

View File

@@ -606,15 +606,6 @@ bool MainWindow::confirmTx(Tx tx, RecurringPaymentInfo* rpi) {
// Syncing warning
confirm.syncingWarning->setVisible(Settings::getInstance()->isSyncing());
// And FromAddress in the confirm dialog
confirm.sendFrom->setText(fnSplitAddressForWrap(tx.fromAddr));
confirm.sendFrom->setFont(fixedFont);
QString tooltip = tr("Current balance : ") +
rpc->getModel()->getAllBalances().value(tx.fromAddr).toDecimalZECUSDString();
tooltip += "\n" + tr("Balance after this Tx: ") +
(rpc->getModel()->getAllBalances().value(tx.fromAddr) - totalSpending).toDecimalZECUSDString();
confirm.sendFrom->setToolTip(tooltip);
// Show the dialog and submit it if the user confirms
return d.exec() == QDialog::Accepted;
}
@@ -686,8 +677,6 @@ void MainWindow::sendButton() {
}
QString MainWindow::doSendTxValidations(Tx tx) {
if (!Settings::isValidAddress(tx.fromAddr)) return QString(tr("From Address is Invalid"));
for (auto toAddr : tx.toAddrs) {
if (!Settings::isValidAddress(toAddr.addr)) {
QString addr = (toAddr.addr.length() > 100 ? toAddr.addr.left(100) + "..." : toAddr.addr);