qml: update history in more cases when saving/removing tx
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user