scoin / multichain-node

A simple wrapper for Multichain's JSON RPC api that parses your input.
MIT License
73 stars 54 forks source link

getAddressBalancePromise not working in Node.js #20

Closed samantaraysambitdash closed 6 years ago

samantaraysambitdash commented 7 years ago

Hi,

I have my part of code as well. PFB.

function getAddressBalance(address) { console.log(JSON.stringify(address.address)); //var addr = address.address; //var minconf = {minconf: 1}; var addr = [address.address]; console.log(addr);

multichain.getAddressBalances(addr,(err, res) => {

    console.log(err);
         return res;
})

}

Please check on the issue.

scoin commented 6 years ago

The first argument to an RPC function is always the parameters object to be parsed by this library, or an array which will go unparsed.