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:
3 files changed
+1
-10
No files matched your search
@@ -742,9 +742,6 @@ void SendCoinsDialog::processSendCoinsReturn(const WalletModel::SendCoinsReturn
|
|||||||
case WalletModel::AmountExceedsBalance:
|
case WalletModel::AmountExceedsBalance:
|
||||||
msgParams.first = tr("The amount exceeds your balance.");
|
msgParams.first = tr("The amount exceeds your balance.");
|
||||||
break;
|
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:
|
case WalletModel::DuplicateAddress:
|
||||||
msgParams.first = tr("Duplicate address found: addresses should only be used once each.");
|
msgParams.first = tr("Duplicate address found: addresses should only be used once each.");
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -209,12 +209,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
|
|||||||
if (fSubtractFeeFromAmount && newTx)
|
if (fSubtractFeeFromAmount && newTx)
|
||||||
transaction.reassignAmounts(nChangePosRet);
|
transaction.reassignAmounts(nChangePosRet);
|
||||||
|
|
||||||
if(!newTx)
|
if (!newTx) {
|
||||||
{
|
|
||||||
if(!fSubtractFeeFromAmount && (total + nFeeRequired) > nBalance)
|
|
||||||
{
|
|
||||||
return SendCoinsReturn(AmountWithFeeExceedsBalance);
|
|
||||||
}
|
|
||||||
Q_EMIT message(tr("Send Coins"), QString::fromStdString(util::ErrorString(res).translated),
|
Q_EMIT message(tr("Send Coins"), QString::fromStdString(util::ErrorString(res).translated),
|
||||||
CClientUIInterface::MSG_ERROR);
|
CClientUIInterface::MSG_ERROR);
|
||||||
return TransactionCreationFailed;
|
return TransactionCreationFailed;
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ public:
|
|||||||
InvalidAmount,
|
InvalidAmount,
|
||||||
InvalidAddress,
|
InvalidAddress,
|
||||||
AmountExceedsBalance,
|
AmountExceedsBalance,
|
||||||
AmountWithFeeExceedsBalance,
|
|
||||||
DuplicateAddress,
|
DuplicateAddress,
|
||||||
TransactionCreationFailed, // Error returned when wallet is still locked
|
TransactionCreationFailed, // Error returned when wallet is still locked
|
||||||
AbsurdFee
|
AbsurdFee
|
||||||
|
|||||||
Reference in new issue
Block a user