|
@ -547,19 +547,19 @@ CopayServer.prototype.removeWallet = function(opts, cb) { |
|
|
* removePendingTx |
|
|
* removePendingTx |
|
|
* |
|
|
* |
|
|
* @param opts |
|
|
* @param opts |
|
|
* @param {string} opts.id - The tx id. |
|
|
* @param {string} opts.txProposalId - The tx id. |
|
|
* @return {undefined} |
|
|
* @return {undefined} |
|
|
*/ |
|
|
*/ |
|
|
CopayServer.prototype.removePendingTx = function(opts, cb) { |
|
|
CopayServer.prototype.removePendingTx = function(opts, cb) { |
|
|
var self = this; |
|
|
var self = this; |
|
|
|
|
|
|
|
|
if (!Utils.checkRequired(opts, ['id'])) |
|
|
if (!Utils.checkRequired(opts, ['txProposalId'])) |
|
|
return cb(new ClientError('Required argument missing')); |
|
|
return cb(new ClientError('Required argument missing')); |
|
|
|
|
|
|
|
|
Utils.runLocked(self.walletId, cb, function(cb) { |
|
|
Utils.runLocked(self.walletId, cb, function(cb) { |
|
|
|
|
|
|
|
|
self.getTx({ |
|
|
self.getTx({ |
|
|
id: opts.id |
|
|
id: opts.txProposalId, |
|
|
}, function(err, txp) { |
|
|
}, function(err, txp) { |
|
|
if (err) return cb(err); |
|
|
if (err) return cb(err); |
|
|
|
|
|
|
|
@ -576,7 +576,7 @@ CopayServer.prototype.removePendingTx = function(opts, cb) { |
|
|
return cb(new ClientError('Cannot remove a proposal signed/rejected by other copayers')); |
|
|
return cb(new ClientError('Cannot remove a proposal signed/rejected by other copayers')); |
|
|
|
|
|
|
|
|
self._notify('transactionProposalRemoved'); |
|
|
self._notify('transactionProposalRemoved'); |
|
|
self.storage.removeTx(self.walletId, opts.id, cb); |
|
|
self.storage.removeTx(self.walletId, txp.id, cb); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}; |
|
|
}; |
|
|