From 3f0cfbc7c1fd00388eb409dc6541cf485deb0a6f Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Thu, 13 Aug 2015 14:23:06 -0300 Subject: [PATCH] listen to address param --- lib/expressapp.js | 5 ++++- lib/server.js | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/expressapp.js b/lib/expressapp.js index 85534ff..5944b5e 100644 --- a/lib/expressapp.js +++ b/lib/expressapp.js @@ -277,8 +277,11 @@ ExpressApp.prototype.start = function(opts, cb) { }); router.get('/v1/utxos/', function(req, res) { + var opts = {}; + var addresses = req.query.addresses; + if (addresses && _.isString(addresses)) opts.addresses = req.query.addresses.split(','); getServerWithAuth(req, res, function(server) { - server.getUtxos({}, function(err, utxos) { + server.getUtxos(opts, function(err, utxos) { if (err) return returnError(err, res, req); res.json(utxos); }); diff --git a/lib/server.js b/lib/server.js index bc6e0b5..d12a04b 100644 --- a/lib/server.js +++ b/lib/server.js @@ -154,7 +154,6 @@ WalletService.getInstance = function(opts) { * @param {string} opts.clientVersion - A string that identifies the client issuing the request */ WalletService.getInstanceWithAuth = function(opts, cb) { - if (!Utils.checkRequired(opts, ['copayerId', 'message', 'signature'])) return cb(new ClientError('Required argument missing'));