1
0

qml: update history in more cases when saving/removing tx

This commit is contained in:
Sander van Grieken
2023-02-06 21:39:41 +01:00
parent d3a10c4225
commit ad26d809a4
2 changed files with 6 additions and 1 deletions

View File

@@ -354,6 +354,7 @@ class QETxDetails(QObject, QtEventListener):
self._wallet.wallet.adb.remove_transaction(txid)
self._wallet.wallet.save_db()
self._wallet.historyModel.init_model(True)
@pyqtSlot()
def save(self):
@@ -367,6 +368,7 @@ class QETxDetails(QObject, QtEventListener):
return
self._wallet.wallet.save_db()
self.saveTxSuccess.emit()
self._wallet.historyModel.init_model(True)
except AddTransactionException as e:
self.saveTxError.emit('error', str(e))
finally:

View File

@@ -513,10 +513,13 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
if not tx.is_complete():
self._logger.debug('tx not complete')
return
broadcast = False
if broadcast:
self.broadcast(tx)
else:
# not broadcasted, so add to history now
self.historyModel.init_model(True)
# this assumes a 2fa wallet, but there are no other tc_sign_wrapper hooks, so that's ok
def on_sign_complete(self, broadcast, tx):