mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
qt, wallet, refactor: Make WalletModel::sendCoins() return void
Currently, the `WalletModel::sendCoins()` function always returns the same value. Also dead and noop code has been removed.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user