commit
c42b4a46fb
|
@ -458,7 +458,7 @@ WalletService.prototype._getUtxos = function(cb) {
|
||||||
|
|
||||||
var bc = self._getBlockchainExplorer('insight', networkName);
|
var bc = self._getBlockchainExplorer('insight', networkName);
|
||||||
bc.getUnspentUtxos(addressStrs, function(err, inutxos) {
|
bc.getUnspentUtxos(addressStrs, function(err, inutxos) {
|
||||||
if (err) return cb(err);
|
if (err) return cb(new Error('Could not fetch unspend outputs:' + err));
|
||||||
var utxos = _.map(inutxos, function(i) {
|
var utxos = _.map(inutxos, function(i) {
|
||||||
return _.pick(i.toObject(), ['txid', 'vout', 'address', 'scriptPubKey', 'amount', 'satoshis']);
|
return _.pick(i.toObject(), ['txid', 'vout', 'address', 'scriptPubKey', 'amount', 'satoshis']);
|
||||||
});
|
});
|
||||||
|
@ -748,7 +748,7 @@ WalletService.prototype.removePendingTx = function(opts, cb) {
|
||||||
if (actors.length > 1 || (actors.length == 1 && actors[0] !== self.copayerId))
|
if (actors.length > 1 || (actors.length == 1 && actors[0] !== self.copayerId))
|
||||||
return cb(new ClientError('TXACTIONED', 'Cannot remove a proposal signed/rejected by other copayers'));
|
return cb(new ClientError('TXACTIONED', 'Cannot remove a proposal signed/rejected by other copayers'));
|
||||||
|
|
||||||
self._notify('transactionProposalRemoved');
|
self._notify('TxProposalRemoved');
|
||||||
self.storage.removeTx(self.walletId, txp.id, cb);
|
self.storage.removeTx(self.walletId, txp.id, cb);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1121,7 +1121,7 @@ WalletService.prototype.getTxHistory = function(opts, cb) {
|
||||||
},
|
},
|
||||||
function(next) {
|
function(next) {
|
||||||
bc.getTransactions(addressStrs, null, null, function(err, txs) {
|
bc.getTransactions(addressStrs, null, null, function(err, txs) {
|
||||||
if (err) return next(err);
|
if (err) return next(new Error('Could not fetch transactions: ' + err));
|
||||||
|
|
||||||
next(null, self._normalizeTxHistory(txs));
|
next(null, self._normalizeTxHistory(txs));
|
||||||
});
|
});
|
||||||
|
@ -1179,7 +1179,7 @@ WalletService.prototype.scan = function(opts, cb) {
|
||||||
if (err) return next(err);
|
if (err) return next(err);
|
||||||
allAddresses.push(addresses);
|
allAddresses.push(addresses);
|
||||||
checkActivity(_.pluck(addresses, 'address'), function(err, thereIsActivity) {
|
checkActivity(_.pluck(addresses, 'address'), function(err, thereIsActivity) {
|
||||||
if (err) return next(err);
|
if (err) return next(new Error('Could not fetch TX activity:' + err));
|
||||||
activity = thereIsActivity;
|
activity = thereIsActivity;
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue