mirror of
https://github.com/monero-project/monero.git
synced 2025-08-02 18:46:12 -04:00
wallet: distinguish between empty and absent attributes
This commit is contained in:
parent
581994b61c
commit
bc94ba4d14
4 changed files with 16 additions and 6 deletions
|
@ -2126,7 +2126,12 @@ namespace tools
|
|||
return false;
|
||||
}
|
||||
|
||||
res.value = m_wallet->get_attribute(req.key);
|
||||
if (!m_wallet->get_attribute(req.key, res.value))
|
||||
{
|
||||
er.code = WALLET_RPC_ERROR_CODE_ATTRIBUTE_NOT_FOUND;
|
||||
er.message = "Attribute not found.";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool wallet_rpc_server::on_get_tx_key(const wallet_rpc::COMMAND_RPC_GET_TX_KEY::request& req, wallet_rpc::COMMAND_RPC_GET_TX_KEY::response& res, epee::json_rpc::error& er, const connection_context *ctx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue