diff --git a/lib/bitcoind-rpc/rpc-client.js b/lib/bitcoind-rpc/rpc-client.js index 84ba57a..e78421f 100644 --- a/lib/bitcoind-rpc/rpc-client.js +++ b/lib/bitcoind-rpc/rpc-client.js @@ -37,7 +37,9 @@ class RpcClient { return async function(...args) { const result = await origMethod.apply(target.client, args) - if (result.result) { + if (Array.isArray(result)) { + return result + } else if (result.result) { return result.result } else if (result.error) { throw result.error