diff --git a/packages/dapi/lib/externalApis/tenderdash/requestTenderRpc.js b/packages/dapi/lib/externalApis/tenderdash/requestTenderRpc.js index 9b6fd3edaf2..15997ee95c5 100644 --- a/packages/dapi/lib/externalApis/tenderdash/requestTenderRpc.js +++ b/packages/dapi/lib/externalApis/tenderdash/requestTenderRpc.js @@ -4,16 +4,17 @@ const RPCError = require('../../rpcServer/RPCError'); /** * @param {jaysonClient} rpcClient - * @return {requestTenderRpc} + * @return {requestTenderRpc} A function to make RPC requests to Tenderdash. */ function requestTenderRpcFactory(rpcClient) { /** + * @function * @typedef requestTenderRpc * @param {string} uri - * @param {Object} [params] + * @param {Object} [params={}] * @return {Promise} */ - return async function requestTenderRpc(uri, params = {}) { + async function requestTenderRpc(uri, params = {}) { let response; try { response = await rpcClient.request(uri, params); @@ -44,7 +45,9 @@ function requestTenderRpcFactory(rpcClient) { } return result; - }; + } + + return requestTenderRpc; } module.exports = requestTenderRpcFactory;