Store wallet immediately after sending tx

This commit is contained in:
tobtoht 2020-12-14 02:15:56 +01:00
parent d1b4db2be4
commit 147ee8ef8b
No known key found for this signature in database
GPG key ID: 1CADD27F41F45C3C

View file

@ -764,7 +764,10 @@ void AppContext::onTransactionCreated(PendingTransaction *tx, const QString &add
void AppContext::onTransactionCommitted(bool status, PendingTransaction *tx, const QStringList& txid){ void AppContext::onTransactionCommitted(bool status, PendingTransaction *tx, const QStringList& txid){
this->currentWallet->history()->refresh(this->currentWallet->currentSubaddressAccount()); this->currentWallet->history()->refresh(this->currentWallet->currentSubaddressAccount());
this->currentWallet->coins()->refresh(this->currentWallet->currentSubaddressAccount()); this->currentWallet->coins()->refresh(this->currentWallet->currentSubaddressAccount());
this->storeWallet();
// Store wallet immediately so we don't risk losing tx key if wallet crashes
this->currentWallet->store();
emit transactionCommitted(status, tx, txid); emit transactionCommitted(status, tx, txid);
// this tx was a donation to Feather, stop our nagging // this tx was a donation to Feather, stop our nagging