Browse Source

Fix from fields in confirm dialog

pull/14/head
Aditya Kulkarni 5 years ago
parent
commit
167cfc8bd5
  1. 19
      src/confirm.ui
  2. 11
      src/sendtab.cpp
  3. 2
      src/version.h

19
src/confirm.ui

@ -14,25 +14,6 @@
<string>Confirm Transaction</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>From</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="sendFrom">
<property name="text">
<string notr="true"/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="sendToAddrs">
<property name="title">

11
src/sendtab.cpp

@ -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);

2
src/version.h

@ -1 +1 @@
#define APP_VERSION "0.7.9"
#define APP_VERSION "1.0-beta1"

Loading…
Cancel
Save