diff --git a/src/masternodes/rpc_vault.cpp b/src/masternodes/rpc_vault.cpp index 838a5b251b..ba1aab2d5a 100644 --- a/src/masternodes/rpc_vault.cpp +++ b/src/masternodes/rpc_vault.cpp @@ -573,8 +573,11 @@ UniValue getvault(const JSONRPCRequest& request) { RPCTypeCheck(request.params, {UniValue::VSTR}, false); if (auto res = GetRPCResultCache().TryGet(request)) return *res; - bool verbose = request.params[1].getBool(); CVaultId vaultId = ParseHashV(request.params[0], "vaultId"); + bool verbose{false}; + if (request.params.size() > 1) { + verbose = request.params[1].get_bool(); + } LOCK(cs_main); @@ -1836,7 +1839,7 @@ static const CRPCCommand commands[] = {"vault", "createvault", &createvault, {"ownerAddress", "schemeId", "inputs"}}, {"vault", "closevault", &closevault, {"id", "returnAddress", "inputs"}}, {"vault", "listvaults", &listvaults, {"options", "pagination"}}, - {"vault", "getvault", &getvault, {"id"}}, + {"vault", "getvault", &getvault, {"id", "verbose"}}, {"vault", "listvaulthistory", &listvaulthistory, {"id", "options"}}, {"vault", "updatevault", &updatevault, {"id", "parameters", "inputs"}}, {"vault", "deposittovault", &deposittovault, {"id", "from", "amount", "inputs"}}, diff --git a/src/rpc/client.cpp b/src/rpc/client.cpp index 907f3c2b99..2219aade11 100644 --- a/src/rpc/client.cpp +++ b/src/rpc/client.cpp @@ -259,6 +259,7 @@ static const CRPCConvertParam vRPCConvertParams[] = { "listvaulthistory", 1, "options" }, { "listvaults", 0, "options" }, { "listvaults", 1, "pagination" }, + { "getvault", 1, "verbose" }, { "listauctions", 0, "pagination" }, { "listauctionhistory", 1, "pagination" }, { "estimateloan", 1, "tokens" },