#70 Calculate max available with custom fees

This commit is contained in:
Aditya Kulkarni
2018-12-07 09:31:38 -08:00
parent 1215aa9cae
commit e2b65c6047
3 changed files with 9 additions and 5 deletions

View File

@@ -371,7 +371,15 @@ void MainWindow::maxAmountChecked(int checked) {
auto amt = ui->sendToWidgets->findChild<QLineEdit*>(QString("Amount") % QString::number(i+1));
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();

View File

@@ -219,8 +219,6 @@ QString Settings::getZboardAddr() {
}
}
double Settings::getTotalFee() { return getMinerFee(); }
bool Settings::isValidAddress(QString addr) {
QRegExp zcexp("^z[a-z0-9]{94}$", Qt::CaseInsensitive);
QRegExp zsexp("^z[a-z0-9]{77}$", Qt::CaseInsensitive);

View File

@@ -73,8 +73,6 @@ public:
static double getMinerFee();
static double getZboardAmount();
static QString getZboardAddr();
static double getTotalFee();
static bool isValidAddress(QString addr);