mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-02 17:56:16 +00:00
gui: remove AmountWithFeeExceedsBalance error special case
Since bitcoin#34299, the wallet handles the error internally and retrieves the proper message.
This commit is contained in:
parent
d88997b809
commit
45372175c3
@ -742,9 +742,6 @@ void SendCoinsDialog::processSendCoinsReturn(const WalletModel::SendCoinsReturn
|
||||
case WalletModel::AmountExceedsBalance:
|
||||
msgParams.first = tr("The amount exceeds your balance.");
|
||||
break;
|
||||
case WalletModel::AmountWithFeeExceedsBalance:
|
||||
msgParams.first = tr("The total exceeds your balance when the %1 transaction fee is included.").arg(msgArg);
|
||||
break;
|
||||
case WalletModel::DuplicateAddress:
|
||||
msgParams.first = tr("Duplicate address found: addresses should only be used once each.");
|
||||
break;
|
||||
|
||||
@ -209,12 +209,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;
|
||||
|
||||
@ -59,7 +59,6 @@ public:
|
||||
InvalidAmount,
|
||||
InvalidAddress,
|
||||
AmountExceedsBalance,
|
||||
AmountWithFeeExceedsBalance,
|
||||
DuplicateAddress,
|
||||
TransactionCreationFailed, // Error returned when wallet is still locked
|
||||
AbsurdFee
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user