aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_rpc_server.cpp
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2021-04-22 01:35:20 -0400
committerluigi1111 <luigi1111w@gmail.com>2021-04-22 01:35:20 -0400
commit9bba3f4767c32292cd616512cc492ca416f6adc1 (patch)
treeca626c29cda8a00891be0e0c78fd73eec161e73c /src/wallet/wallet_rpc_server.cpp
parentMerge pull request #7643 (diff)
parentmonero-wallet-cli: improve error message when tx amount is zero (diff)
downloadmonero-9bba3f4767c32292cd616512cc492ca416f6adc1.tar.xz
Merge pull request #7651
c8ff1d4 monero-wallet-cli: improve error message when tx amount is zero (Elliot Wirrick)
Diffstat (limited to 'src/wallet/wallet_rpc_server.cpp')
-rw-r--r--src/wallet/wallet_rpc_server.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
index b39a40b64..0b200ae60 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -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;