aboutsummaryrefslogtreecommitdiff
path: root/src/qt/sendcoinsdialog.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-06-12 12:55:26 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-06-12 13:33:55 +0200
commit9ef180a0ab880211b92c6b07f06b93e22e98bee6 (patch)
tree540e4f95bc7bc8176796be499fae04792c54c664 /src/qt/sendcoinsdialog.cpp
parentb71d37da2c8c8d2a9cef020731767a6929db54b4 (diff)
parent1f653dc2623ee2be3e1eeeaf5ce0e97966cecd6a (diff)
downloadbitcoin-9ef180a0ab880211b92c6b07f06b93e22e98bee6.tar.xz
Merge bitcoin-core/gui#608: wallet, refactor: Make `WalletModel::sendCoins()` return `void`
1f653dc2623ee2be3e1eeeaf5ce0e97966cecd6a qt, wallet, refactor: Make `WalletModel::sendCoins()` return `void` (Hennadii Stepanov) Pull request description: Currently, the `WalletModel::sendCoins()` function always returns the same value. Also dead and noop (calling `processSendCoinsReturn(OK)`) code has been removed. The other `return` statements have been removed from the `WalletModel::sendCoins()` function in bitcoin/bitcoin#17154 and bitcoin/bitcoin#17165. ACKs for top commit: kristapsk: cr ACK 1f653dc2623ee2be3e1eeeaf5ce0e97966cecd6a furszy: Code review ACK 1f653dc2 shaavan: Code Review ACK 1f653dc2623ee2be3e1eeeaf5ce0e97966cecd6a w0xlt: Code Review ACK https://github.com/bitcoin-core/gui/pull/608/commits/1f653dc2623ee2be3e1eeeaf5ce0e97966cecd6a Tree-SHA512: 2b59495a7fc10b4de30fcc63fc3af92d50406e16031112eb72494736dce193ac1fbac0802623496cf81edcd16766e1647d9c4f3a607b3eb84cc50e273b999c04
Diffstat (limited to 'src/qt/sendcoinsdialog.cpp')
-rw-r--r--src/qt/sendcoinsdialog.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index d8daccecbd..61d2782222 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -543,15 +543,8 @@ void SendCoinsDialog::sendButtonClicked([[maybe_unused]] bool checked)
// failed, or more signatures are needed.
if (broadcast) {
// now send the prepared transaction
- WalletModel::SendCoinsReturn sendStatus = model->sendCoins(*m_current_transaction);
- // process sendStatus and on error generate message shown to user
- processSendCoinsReturn(sendStatus);
-
- if (sendStatus.status == WalletModel::OK) {
- Q_EMIT coinsSent(m_current_transaction->getWtx()->GetHash());
- } else {
- send_failure = true;
- }
+ model->sendCoins(*m_current_transaction);
+ Q_EMIT coinsSent(m_current_transaction->getWtx()->GetHash());
}
}
if (!send_failure) {