Ivan Socolsky
9 years ago
No known key found for this signature in database
GPG Key ID: FAECE6A05FAA4F56
1 changed files with
5 additions and
3 deletions
-
lib/expressapp.js
|
@ -401,10 +401,12 @@ ExpressApp.prototype.start = function(opts, cb) { |
|
|
|
|
|
|
|
|
router.get('/v1/sendmaxinfo/', function(req, res) { |
|
|
router.get('/v1/sendmaxinfo/', function(req, res) { |
|
|
getServerWithAuth(req, res, function(server) { |
|
|
getServerWithAuth(req, res, function(server) { |
|
|
|
|
|
var q = req.query; |
|
|
var opts = {}; |
|
|
var opts = {}; |
|
|
opts.feePerKb = +req.query.feePerKb; |
|
|
if (q.feePerKb) opts.feePerKb = +q.feePerKb; |
|
|
if (req.query.excludeUnconfirmedUtxos == '1') opts.excludeUnconfirmedUtxos = true; |
|
|
if (q.feeLevel) opts.feeLevel = q.feeLevel; |
|
|
if (req.query.returnInputs == '1') opts.returnInputs = true; |
|
|
if (q.excludeUnconfirmedUtxos == '1') opts.excludeUnconfirmedUtxos = true; |
|
|
|
|
|
if (q.returnInputs == '1') opts.returnInputs = true; |
|
|
server.getSendMaxInfo(opts, function(err, info) { |
|
|
server.getSendMaxInfo(opts, function(err, info) { |
|
|
if (err) return returnError(err, res, req); |
|
|
if (err) return returnError(err, res, req); |
|
|
res.json(info); |
|
|
res.json(info); |
|
|