mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Return appropriate error code when not enough money for tx
This commit is contained in:
parent
6ed314854c
commit
3cb65b3f69
2 changed files with 6 additions and 0 deletions
|
@ -2412,6 +2412,11 @@ namespace tools
|
||||||
er.code = WALLET_RPC_ERROR_CODE_NOT_ENOUGH_MONEY;
|
er.code = WALLET_RPC_ERROR_CODE_NOT_ENOUGH_MONEY;
|
||||||
er.message = e.what();
|
er.message = e.what();
|
||||||
}
|
}
|
||||||
|
catch (const tools::error::not_enough_unlocked_money& e)
|
||||||
|
{
|
||||||
|
er.code = WALLET_RPC_ERROR_CODE_NOT_ENOUGH_UNLOCKED_MONEY;
|
||||||
|
er.message = e.what();
|
||||||
|
}
|
||||||
catch (const tools::error::tx_not_possible& e)
|
catch (const tools::error::tx_not_possible& e)
|
||||||
{
|
{
|
||||||
er.code = WALLET_RPC_ERROR_CODE_TX_NOT_POSSIBLE;
|
er.code = WALLET_RPC_ERROR_CODE_TX_NOT_POSSIBLE;
|
||||||
|
|
|
@ -67,3 +67,4 @@
|
||||||
#define WALLET_RPC_ERROR_CODE_BAD_MULTISIG_TX_DATA -34
|
#define WALLET_RPC_ERROR_CODE_BAD_MULTISIG_TX_DATA -34
|
||||||
#define WALLET_RPC_ERROR_CODE_MULTISIG_SIGNATURE -35
|
#define WALLET_RPC_ERROR_CODE_MULTISIG_SIGNATURE -35
|
||||||
#define WALLET_RPC_ERROR_CODE_MULTISIG_SUBMISSION -36
|
#define WALLET_RPC_ERROR_CODE_MULTISIG_SUBMISSION -36
|
||||||
|
#define WALLET_RPC_ERROR_CODE_NOT_ENOUGH_UNLOCKED_MONEY -37
|
||||||
|
|
Loading…
Reference in a new issue