]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
libwalletqt: pause refresh during tx construction
authortobtoht <tob@featherwallet.org>
Tue, 12 Mar 2024 15:43:58 +0000 (16:43 +0100)
committertobtoht <tob@featherwallet.org>
Tue, 12 Mar 2024 15:43:58 +0000 (16:43 +0100)
src/libwalletqt/Wallet.cpp

index e5c2bbb1f1201c38e60204c2af6f1a70aacf8261..f3bb3d1fc1a3d3b8457c24d56e31408ca4ce605d 100644 (file)
@@ -832,6 +832,7 @@ void Wallet::setSelectedInputs(const QStringList &selectedInputs) {
 
 void Wallet::createTransaction(const QString &address, quint64 amount, const QString &description, bool all) {
     this->tmpTxDescription = description;
+    pauseRefresh();
 
     qInfo() << "Creating transaction";
     m_scheduler.run([this, all, address, amount] {
@@ -850,6 +851,7 @@ void Wallet::createTransaction(const QString &address, quint64 amount, const QSt
 
 void Wallet::createTransactionMultiDest(const QVector<QString> &addresses, const QVector<quint64> &amounts, const QString &description) {
     this->tmpTxDescription = description;
+    pauseRefresh();
 
     qInfo() << "Creating transaction";
     m_scheduler.run([this, addresses, amounts] {
@@ -875,6 +877,7 @@ void Wallet::createTransactionMultiDest(const QVector<QString> &addresses, const
 }
 
 void Wallet::sweepOutputs(const QVector<QString> &keyImages, QString address, bool churn, int outputs) {
+    pauseRefresh();
     if (churn) {
         address = this->address(0, 0);
     }
@@ -901,6 +904,7 @@ void Wallet::sweepOutputs(const QVector<QString> &keyImages, QString address, bo
 
 void Wallet::onTransactionCreated(Monero::PendingTransaction *mtx, const QVector<QString> &address) {
     qDebug() << Q_FUNC_INFO;
+    startRefresh();
 
     PendingTransaction *tx = new PendingTransaction(mtx, this);