AddressProperty for unconfirmedBalance
This commit is contained in:
parent
306f2cd1e3
commit
b8ac382370
@ -58,3 +58,16 @@ exports.totalSent = function(req, res, next) {
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
exports.unconfirmedBalance = function(req, res, next) {
|
||||
var a = getAddr(req, res, next);
|
||||
if (a)
|
||||
a.update(function(err) {
|
||||
if (err) {
|
||||
return common.handleErrors(err, res);
|
||||
}
|
||||
else {
|
||||
return res.jsonp(a.unconfirmedBalanceSat);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@ -37,6 +37,7 @@ module.exports = function(app) {
|
||||
app.get(apiPrefix + '/addr/:addr/balance', addressProperties.balance);
|
||||
app.get(apiPrefix + '/addr/:addr/totalReceived', addressProperties.totalReceived);
|
||||
app.get(apiPrefix + '/addr/:addr/totalSent', addressProperties.totalSent);
|
||||
app.get(apiPrefix + '/addr/:addr/unconfirmedBalance', addressProperties.unconfirmedBalance);
|
||||
|
||||
// Status route
|
||||
var st = require('../app/controllers/status');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user