Skip to content

Commit

Permalink
gui: remove unreachable AmountWithFeeExceedsBalance error
Browse files Browse the repository at this point in the history
Internally, 'createTransaction' only returns the fee when the transaction
creation process succeeds.

This error can be reintroduced in the future in a cleaner manner when
the feature becomes available at the backend level.
  • Loading branch information
furszy committed Mar 22, 2024
1 parent 71b6319 commit 786e3c5
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/qt/walletmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
if (fSubtractFeeFromAmount && newTx)
transaction.reassignAmounts(nChangePosRet);

if(!newTx)
{
if(!fSubtractFeeFromAmount && (total + nFeeRequired) > nBalance)
{
return SendCoinsReturn(AmountWithFeeExceedsBalance);
}
if (!newTx) {
Q_EMIT message(tr("Send Coins"), QString::fromStdString(util::ErrorString(res).translated),
CClientUIInterface::MSG_ERROR);
return TransactionCreationFailed;
Expand Down

0 comments on commit 786e3c5

Please sign in to comment.