diff --git a/lib/bcoin/http/rpc.js b/lib/bcoin/http/rpc.js index fc9eff31..ceab1a21 100644 --- a/lib/bcoin/http/rpc.js +++ b/lib/bcoin/http/rpc.js @@ -3365,7 +3365,8 @@ RPC.prototype.listunspent = function listunspent(args, callback) { var minDepth = 1; var maxDepth = 9999999; var out = []; - var i, addresses, map, coin, depth, address, hash, ring; + var map = {}; + var i, addresses, coin, depth, address, hash, ring; if (args.help || args.length > 3) { return callback(new RPCError('listunspent' @@ -3383,7 +3384,6 @@ RPC.prototype.listunspent = function listunspent(args, callback) { if (Array.isArray(args[2])) { addresses = true; - map = {}; utils.forEachSerial(args[2], function(address, next) { hash = bcoin.address.getHash(String(address), 'hex');