Skip to content

Commit

Permalink
fix: getAssetInfo call with utxo=undefined #2
Browse files Browse the repository at this point in the history
  • Loading branch information
oded leiba committed Aug 29, 2016
1 parent 15bd367 commit bc85344
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions coluutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = (function () {
//client.registerMethod("getaddressutxos", config.blockexplorer.url + "/api/getaddressutxos?address=${address}", "GET")
client.registerMethod("getaddressutxos", config.blockexplorer.url + "/api/getaddressesutxos", "POST")
client.registerMethod("getassetholders", config.blockexplorer.url + "/api/getassetholders?assetId=${assetid}&confirmations=${minconf}", "GET")
client.registerMethod("getassetinfo", config.blockexplorer.url + "/api/getassetinfo?assetId=${assetid}", "GET")
client.registerMethod("getassetinfo", config.blockexplorer.url + "/api/getassetinfo", "GET")
client.registerMethod("gettransaction", config.blockexplorer.url + "/api/gettransaction?txid=${txid}", "GET")
client.registerMethod("getutxo", config.blockexplorer.url + "/api/getutxos", "POST")
client.registerMethod("broadcasttx", config.blockexplorer.url + "/api/transmit", "POST")
Expand Down Expand Up @@ -830,13 +830,13 @@ coluutils.requestParseTx = function requestParseTx(txid)
{
var deferred = Q.defer();
var args = {
path: { "assetId": assetId },
parameters: {"assetId": assetId},
headers: _.assign({"Content-Type": "application/json"}, getHeadersToForward())
}
try{

if (typeof args.utxo !== 'undefined') args.parameters.utxo = utxo
if (typeof args.verbosity !== 'undefined') args.parameters.verbosity = verbosity
if (typeof utxo !== 'undefined') args.parameters.utxo = utxo
if (typeof verbosity !== 'undefined') args.parameters.verbosity = verbosity
client.methods.getassetinfo(args, function (data, response) {
console.log(data.toString());
if (response.statusCode == 200) {
Expand Down

0 comments on commit bc85344

Please sign in to comment.