Browse Source

add support of batch calls to rpc client

umbrel
kenshin-samourai 5 years ago
parent
commit
a711cf1a59
  1. 4
      lib/bitcoind-rpc/rpc-client.js

4
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

Loading…
Cancel
Save