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

@@ -544,6 +544,10 @@ void RPC::getInfoThenRefresh(bool force) {
Settings::getInstance()->setTestnet(reply["testnet"].get<json::boolean_t>());
};
// Recurring pamynets are testnet only
if (!Settings::getInstance()->isTestnet())
main->disableRecurring();
// Connected, so display checkmark.
QIcon i(":/icons/res/connected.gif");
main->statusIcon->setPixmap(i.pixmap(16, 16));
@@ -560,6 +564,9 @@ void RPC::getInfoThenRefresh(bool force) {
// See if the turnstile migration has any steps that need to be done.
turnstile->executeMigrationStep();
// See if recurring payments needs anything
Recurring::getInstance()->processPending(main);
refreshBalances();
refreshAddresses(); // This calls refreshZSentTransactions() and refreshReceivedZTrans()
refreshTransactions();
@@ -643,7 +650,7 @@ void RPC::getInfoThenRefresh(bool force) {
ui->lblSyncWarning->setVisible(isSyncing);
ui->lblSyncWarningReceive->setVisible(isSyncing);
auto zecPrice = Settings::getUSDFormat(1);
auto zecPrice = Settings::getInstance()->getUSDFromZecAmount(1);
QString tooltip;
if (connections > 0) {
tooltip = QObject::tr("Connected to zcashd");
@@ -764,9 +771,10 @@ void RPC::refreshBalances() {
ui->balTransparent->setText(Settings::getZECDisplayFormat(balT));
ui->balTotal ->setText(Settings::getZECDisplayFormat(balTotal));
ui->balSheilded ->setToolTip(Settings::getUSDFormat(balZ));
ui->balTransparent->setToolTip(Settings::getUSDFormat(balT));
ui->balTotal ->setToolTip(Settings::getUSDFormat(balTotal));
ui->balSheilded ->setToolTip(Settings::getZECDisplayFormat(balZ));
ui->balTransparent->setToolTip(Settings::getZECDisplayFormat(balT));
ui->balTotal ->setToolTip(Settings::getZECDisplayFormat(balTotal));
});
// 2. Get the UTXOs