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 Apr 18, 2024
1 parent c05c214 commit 355199c
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 355199c

Please sign in to comment.