mirror of
https://github.com/monero-project/monero.git
synced 2025-01-28 18:56:31 +02:00
Added minimum fee error message in 'transfer' RPC call
This commit is contained in:
parent
38a8e5c5f1
commit
5f31331c6e
@ -89,6 +89,12 @@ namespace tools
|
|||||||
bool wallet_rpc_server::on_transfer(const wallet_rpc::COMMAND_RPC_TRANSFER::request& req, wallet_rpc::COMMAND_RPC_TRANSFER::response& res, epee::json_rpc::error& er, connection_context& cntx)
|
bool wallet_rpc_server::on_transfer(const wallet_rpc::COMMAND_RPC_TRANSFER::request& req, wallet_rpc::COMMAND_RPC_TRANSFER::response& res, epee::json_rpc::error& er, connection_context& cntx)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if ( req.fee < DEFAULT_FEE ) {
|
||||||
|
er.code = WALLET_RPC_ERROR_CODE_WRONG_FEE;
|
||||||
|
er.message = "Fee is not valid. Minimum fee : " + std::to_string(DEFAULT_FEE) + " (Moneroshi)";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<cryptonote::tx_destination_entry> dsts;
|
std::vector<cryptonote::tx_destination_entry> dsts;
|
||||||
for (auto it = req.destinations.begin(); it != req.destinations.end(); it++)
|
for (auto it = req.destinations.begin(); it != req.destinations.end(); it++)
|
||||||
{
|
{
|
||||||
|
@ -11,3 +11,4 @@
|
|||||||
#define WALLET_RPC_ERROR_CODE_GENERIC_TRANSFER_ERROR -4
|
#define WALLET_RPC_ERROR_CODE_GENERIC_TRANSFER_ERROR -4
|
||||||
#define WALLET_RPC_ERROR_CODE_WRONG_PAYMENT_ID -5
|
#define WALLET_RPC_ERROR_CODE_WRONG_PAYMENT_ID -5
|
||||||
#define WALLET_RPC_ERROR_CODE_TRANSFER_TYPE -6
|
#define WALLET_RPC_ERROR_CODE_TRANSFER_TYPE -6
|
||||||
|
#define WALLET_RPC_ERROR_CODE_WRONG_FEE -7
|
||||||
|
Loading…
Reference in New Issue
Block a user