mirror of
https://github.com/monero-project/monero.git
synced 2025-08-08 20:32:19 -04:00
Merge pull request #7651
c8ff1d4
monero-wallet-cli: improve error message when tx amount is zero (Elliot Wirrick)
This commit is contained in:
commit
9bba3f4767
6 changed files with 30 additions and 8 deletions
|
@ -822,7 +822,7 @@ namespace tools
|
|||
if (at_least_one_destination && dsts.empty())
|
||||
{
|
||||
er.code = WALLET_RPC_ERROR_CODE_ZERO_DESTINATION;
|
||||
er.message = "No destinations for this transfer";
|
||||
er.message = "Transaction has no destination";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -3359,6 +3359,11 @@ namespace tools
|
|||
er.code = WALLET_RPC_ERROR_CODE_DAEMON_IS_BUSY;
|
||||
er.message = e.what();
|
||||
}
|
||||
catch (const tools::error::zero_amount& e)
|
||||
{
|
||||
er.code = WALLET_RPC_ERROR_CODE_ZERO_AMOUNT;
|
||||
er.message = e.what();
|
||||
}
|
||||
catch (const tools::error::zero_destination& e)
|
||||
{
|
||||
er.code = WALLET_RPC_ERROR_CODE_ZERO_DESTINATION;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue