libwalletqt: don't refresh models or store on updated

This commit is contained in:
tobtoht 2023-03-17 13:59:55 +01:00
parent e3e25e8536
commit 1f50cd6335
No known key found for this signature in database
GPG key ID: E45B10DD027D2472

View file

@ -429,18 +429,11 @@ void Wallet::onNewBlock(uint64_t walletHeight) {
this->syncStatusUpdated(walletHeight, daemonHeight); this->syncStatusUpdated(walletHeight, daemonHeight);
if (this->isSynchronized()) { if (this->isSynchronized()) {
this->coins()->refreshUnlocked(); this->refreshModels();
this->history()->refresh(this->currentSubaddressAccount());
// Todo: only refresh tx confirmations
} }
} }
void Wallet::onUpdated() { void Wallet::onUpdated() {
if (m_walletImpl->synchronized()) {
this->refreshModels();
this->storeSafer();
}
this->updateBalance(); this->updateBalance();
} }
@ -453,7 +446,6 @@ void Wallet::onRefreshed(bool success, const QString &message) {
} }
if (!this->refreshedOnce) { if (!this->refreshedOnce) {
this->refreshModels();
this->refreshedOnce = true; this->refreshedOnce = true;
emit walletRefreshed(); emit walletRefreshed();
// store wallet immediately upon finishing synchronization // store wallet immediately upon finishing synchronization