#70 Calculate max available with custom fees
This commit is contained in:
@@ -371,7 +371,15 @@ void MainWindow::maxAmountChecked(int checked) {
|
|||||||
auto amt = ui->sendToWidgets->findChild<QLineEdit*>(QString("Amount") % QString::number(i+1));
|
auto amt = ui->sendToWidgets->findChild<QLineEdit*>(QString("Amount") % QString::number(i+1));
|
||||||
sumAllAmounts += amt->text().toDouble();
|
sumAllAmounts += amt->text().toDouble();
|
||||||
}
|
}
|
||||||
sumAllAmounts += Settings::getTotalFee();
|
|
||||||
|
if (Settings::getInstance()->getAllowCustomFees()) {
|
||||||
|
sumAllAmounts = ui->minerFeeAmt->text().toDouble();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
sumAllAmounts += Settings::getMinerFee();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
auto addr = ui->inputsCombo->currentText();
|
auto addr = ui->inputsCombo->currentText();
|
||||||
|
|
||||||
|
|||||||
@@ -219,8 +219,6 @@ QString Settings::getZboardAddr() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
double Settings::getTotalFee() { return getMinerFee(); }
|
|
||||||
|
|
||||||
bool Settings::isValidAddress(QString addr) {
|
bool Settings::isValidAddress(QString addr) {
|
||||||
QRegExp zcexp("^z[a-z0-9]{94}$", Qt::CaseInsensitive);
|
QRegExp zcexp("^z[a-z0-9]{94}$", Qt::CaseInsensitive);
|
||||||
QRegExp zsexp("^z[a-z0-9]{77}$", Qt::CaseInsensitive);
|
QRegExp zsexp("^z[a-z0-9]{77}$", Qt::CaseInsensitive);
|
||||||
|
|||||||
@@ -73,8 +73,6 @@ public:
|
|||||||
static double getMinerFee();
|
static double getMinerFee();
|
||||||
static double getZboardAmount();
|
static double getZboardAmount();
|
||||||
static QString getZboardAddr();
|
static QString getZboardAddr();
|
||||||
|
|
||||||
static double getTotalFee();
|
|
||||||
|
|
||||||
static bool isValidAddress(QString addr);
|
static bool isValidAddress(QString addr);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user