diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp index 46f843de..90172d15 100644 --- a/src/libwalletqt/Wallet.cpp +++ b/src/libwalletqt/Wallet.cpp @@ -524,7 +524,8 @@ bool Wallet::submitTxFile(const QString &fileName) const void Wallet::commitTransactionAsync(PendingTransaction *t) { m_scheduler.run([this, t] { - emit transactionCommitted(t->commit(), t, t->txid()); + auto txIdList = t->txid(); // retrieve before commit + emit transactionCommitted(t->commit(), t, txIdList); }); } diff --git a/src/libwalletqt/Wallet.h b/src/libwalletqt/Wallet.h index 95d4a954..15da7a80 100644 --- a/src/libwalletqt/Wallet.h +++ b/src/libwalletqt/Wallet.h @@ -351,7 +351,7 @@ signals: void walletCreationHeightChanged(); void deviceButtonRequest(quint64 buttonCode); void deviceButtonPressed(); - void transactionCommitted(bool status, PendingTransaction *t, QStringList txid); + void transactionCommitted(bool status, PendingTransaction *t, const QStringList& txid); void heightRefreshed(quint64 walletHeight, quint64 daemonHeight, quint64 targetHeight) const; // emitted when transaction is created async