void WalletModel::update() { qint64 newBalance = getBalance(); qint64 newUnconfirmedBalance = getUnconfirmedBalance(); int newNumTransactions = getNumTransactions(); EncryptionStatus newEncryptionStatus = getEncryptionStatus(); bool newMintStatus = getMintUnlockedbool(); qint64 newReserveBalance = getCoinStakeReserveValue(); if (cachedBalance != newBalance || cachedUnconfirmedBalance != newUnconfirmedBalance) emit balanceChanged(newBalance, getStake(), newUnconfirmedBalance); if (cachedNumTransactions != newNumTransactions) emit numTransactionsChanged(newNumTransactions); if (cachedEncryptionStatus != newEncryptionStatus) emit encryptionStatusChanged(newEncryptionStatus); if (cachedMintStatus != newMintStatus) emit mintStatusChanged(newMintStatus,newReserveBalance); cachedBalance = newBalance; cachedUnconfirmedBalance = newUnconfirmedBalance; cachedNumTransactions = newNumTransactions; cachedMintStatus = newMintStatus; cachedReserveBalance = newReserveBalance; }
void WalletModel::updateTransaction() { // Balance and number of transactions might have changed checkBalanceChanged(); int newNumTransactions = getNumTransactions(); if(cachedNumTransactions != newNumTransactions) { cachedNumTransactions = newNumTransactions; emit numTransactionsChanged(newNumTransactions); } }
void WalletModel::updateTransaction(const QString &hash, int status) { if(transactionTableModel) transactionTableModel->updateTransaction(hash, status); // Balance and number of transactions might have changed checkBalanceChanged(); int newNumTransactions = getNumTransactions(); if(cachedNumTransactions != newNumTransactions) { cachedNumTransactions = newNumTransactions; emit numTransactionsChanged(newNumTransactions); } }
void WalletModel::updateTransaction(const QString &hash, int status) { if(transactionTableModel) transactionTableModel->updateTransaction(hash, status); // Balance and number of transactions might have changed checkBalanceChanged(); if(cachedUnconfirmedBalance || cachedImmatureBalance) pollTimer->start(); int newNumTransactions = getNumTransactions(); if(cachedNumTransactions != newNumTransactions) { emit numTransactionsChanged(newNumTransactions); cachedNumTransactions = newNumTransactions; } }
void WalletModel::update() { qint64 newBalance = getBalance(); qint64 newUnconfirmedBalance = getUnconfirmedBalance(); int newNumTransactions = getNumTransactions(); EncryptionStatus newEncryptionStatus = getEncryptionStatus(); if(cachedBalance != newBalance || cachedUnconfirmedBalance != newUnconfirmedBalance) emit balanceChanged(newBalance, getStake(), newUnconfirmedBalance); if(cachedNumTransactions != newNumTransactions) emit numTransactionsChanged(newNumTransactions); if(cachedEncryptionStatus != newEncryptionStatus) emit encryptionStatusChanged(newEncryptionStatus); cachedBalance = newBalance; cachedUnconfirmedBalance = newUnconfirmedBalance; cachedNumTransactions = newNumTransactions; }