Fixing recently sent txs.
This commit is contained in:
parent
d3515e12c9
commit
b6b730ea2a
@ -163,7 +163,6 @@ AddressController.prototype.multiutxo = function(req, res) {
|
||||
} else {
|
||||
addresses = req.addrs.split(',');
|
||||
}
|
||||
|
||||
async.eachLimit(addresses, 4, function(addr, next) {
|
||||
|
||||
self._address.getAddressUnspentOutputs(addr, {}, function(err, utxos) {
|
||||
@ -220,6 +219,7 @@ AddressController.prototype._getTransformOptions = function(req) {
|
||||
AddressController.prototype.multitxs = function(req, res) {
|
||||
var self = this;
|
||||
|
||||
console.log(req.body);
|
||||
var options = {
|
||||
from: parseInt(req.query.from) || parseInt(req.body.from) || 0
|
||||
};
|
||||
@ -238,12 +238,15 @@ AddressController.prototype.multitxs = function(req, res) {
|
||||
if (err) {
|
||||
return self.common.handleErrors(err, res);
|
||||
}
|
||||
res.jsonp({
|
||||
|
||||
var ret = {
|
||||
totalItems: result.totalCount,
|
||||
from: options.from,
|
||||
to: Math.min(options.to, result.totalCount),
|
||||
items: items
|
||||
});
|
||||
};
|
||||
|
||||
res.jsonp(ret);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@ -14,6 +14,7 @@ function TxController(node) {
|
||||
this._block = this.node.services.block;
|
||||
this._transaction = this.node.services.transaction;
|
||||
this._address = this.node.services.address;
|
||||
this._p2p = this.node.services.p2p;
|
||||
this._network = this.node.network;
|
||||
if (this.node.network === 'livenet') {
|
||||
this._network = 'main';
|
||||
@ -324,7 +325,7 @@ TxController.prototype.list = function(req, res) {
|
||||
|
||||
TxController.prototype.send = function(req, res) {
|
||||
var self = this;
|
||||
this._transaction.sendTransaction(req.body.rawtx, function(err, txid) {
|
||||
this._p2p.sendTransaction(req.body.rawtx, function(err, txid) {
|
||||
if(err) {
|
||||
// TODO handle specific errors
|
||||
return self.common.handleErrors(err, res);
|
||||
|
||||
@ -45,10 +45,6 @@ var SimpleMap = function SimpleMap() {
|
||||
this.size = 0;
|
||||
this.length = 0;
|
||||
|
||||
this.hasNullItems = function() {
|
||||
return array.length !== _.compact(array).length;
|
||||
};
|
||||
|
||||
this.remove = function(item) {
|
||||
var index = object[item];
|
||||
if (index) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user