Skip to content

Commit a4007a4

Browse files
committed
gui: remove unreachable AmountWithFeeExceedsBalance error
Since #20640, the 'createTransaction' does no longer retrieve the fee if the process fails due to insufficient funds. But, since #25269, 'createTransaction' retrieves an error message indicating that the total transaction amount exceeds the wallet available balance when fees are included. So this enum is no longer needed.
1 parent 900e5ed commit a4007a4

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/qt/walletmodel.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
214214
if (fSubtractFeeFromAmount && newTx)
215215
transaction.reassignAmounts(nChangePosRet);
216216

217-
if(!newTx)
218-
{
219-
if(!fSubtractFeeFromAmount && (total + nFeeRequired) > nBalance)
220-
{
221-
return SendCoinsReturn(AmountWithFeeExceedsBalance);
222-
}
217+
if (!newTx) {
223218
Q_EMIT message(tr("Send Coins"), QString::fromStdString(util::ErrorString(res).translated),
224219
CClientUIInterface::MSG_ERROR);
225220
return TransactionCreationFailed;

0 commit comments

Comments
 (0)