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:
@@ -244,17 +244,24 @@ AddressBook::AddressBook() {
|
||||
void AddressBook::readFromStorage() {
|
||||
QFile file(AddressBook::writeableFile());
|
||||
|
||||
if (!file.exists()) {
|
||||
return;
|
||||
if (file.exists()) {
|
||||
allLabels.clear();
|
||||
file.open(QIODevice::ReadOnly);
|
||||
QDataStream in(&file); // read the data serialized from the file
|
||||
QString version;
|
||||
in >> version >> allLabels;
|
||||
|
||||
file.close();
|
||||
}
|
||||
|
||||
allLabels.clear();
|
||||
file.open(QIODevice::ReadOnly);
|
||||
QDataStream in(&file); // read the data serialized from the file
|
||||
QString version;
|
||||
in >> version >> allLabels;
|
||||
|
||||
file.close();
|
||||
// Special.
|
||||
// Add the default ZecWallet donation address if it isn't already present
|
||||
QList<QString> allAddresses;
|
||||
std::transform(allLabels.begin(), allLabels.end(),
|
||||
std::back_inserter(allAddresses), [=] (auto i) { return i.second; });
|
||||
if (!allAddresses.contains(Settings::getDonationAddr(true))) {
|
||||
allLabels.append(QPair<QString, QString>("ZecWallet donation", Settings::getDonationAddr(true)));
|
||||
}
|
||||
}
|
||||
|
||||
void AddressBook::writeToStorage() {
|
||||
|
||||
Reference in New Issue
Block a user