Recurring (#131)

* Save created recurring info

* Add to confirm dialog

* Update RPI at confirm

* Make singleton

* Add history to recurring payments

* USD/ZEC switch

* Fix check state

* recurring item serialization

* Add recurring payments to file

* Refactor

* Address view model

* Wire up dialog

* Update windows installer logos

* Store all payments in the store

* Save table geometry

* Add recurring payments view

* Add deletion

* Add recurring payment execution

* Add donation address to address book

* Add multiple payment handling

* Disable recurring for multiple payments

* Handle pay last

* Handle pay all

* Reomve frequency

* Enable recurring payments only for testnet

* For testing, allow payments in 5 min intervals

* Fix request money amounts
This commit is contained in:
adityapk00
2019-05-14 13:12:31 -07:00
committed by GitHub
parent cf3edd4aba
commit 41bc296f20
21 changed files with 1448 additions and 210 deletions

View File

@@ -161,9 +161,15 @@ void Settings::saveRestore(QDialog* d) {
}
QString Settings::getUSDFormat(double bal) {
return "$" + QLocale(QLocale::English).toString(bal * Settings::getInstance()->getZECPrice(), 'f', 2);
return "$" + QLocale(QLocale::English).toString(bal, 'f', 2);
}
QString Settings::getUSDFromZecAmount(double bal) {
return getUSDFormat(bal * Settings::getInstance()->getZECPrice());
}
QString Settings::getDecimalString(double amt) {
QString f = QString::number(amt, 'f', 8);
@@ -182,9 +188,9 @@ QString Settings::getZECDisplayFormat(double bal) {
}
QString Settings::getZECUSDDisplayFormat(double bal) {
auto usdFormat = getUSDFormat(bal);
auto usdFormat = getUSDFromZecAmount(bal);
if (!usdFormat.isEmpty())
return getZECDisplayFormat(bal) % " (" % getUSDFormat(bal) % ")";
return getZECDisplayFormat(bal) % " (" % usdFormat % ")";
else
return getZECDisplayFormat(bal);
}