diff options
Diffstat (limited to 'src/wallet/wallet_rpc_server.cpp')
-rw-r--r-- | src/wallet/wallet_rpc_server.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index 063716a9e..26da8d434 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -403,4 +403,22 @@ namespace tools return true; } //------------------------------------------------------------------------------------------------------------------------------ + bool wallet_rpc_server::on_query_key(const wallet_rpc::COMMAND_RPC_QUERY_KEY::request& req, wallet_rpc::COMMAND_RPC_QUERY_KEY::response& res, epee::json_rpc::error& er, connection_context& cntx) + { + if (req.key_type.compare("mnemonic") == 0) + { + if (!m_wallet.get_seed(res.key)) + { + er.message = "The wallet is non-deterministic. Cannot display seed."; + return false; + } + } + else + { + er.message = "key_type " + req.key_type + " not found"; + return false; + } + + return true; + } } |