sign TX dummy test passing

This commit is contained in:
Matias Alejo Garcia 2015-02-04 16:27:36 -03:00
parent 0758c2e842
commit 06ae34a71f
1 changed files with 9 additions and 3 deletions

View File

@ -485,7 +485,10 @@ CopayServer.prototype.signTx = function(opts, cb) {
Utils.checkRequired(opts, ['walletId', 'copayerId', 'txProposalId', 'signatures']);
self.fetchTx(opts.walletId, opts.txProposalId, function(err, txp) {
self.getTx({
walletId: opts.walletId,
id: opts.txProposalId
}, function(err, txp) {
if (err) return cb(err);
if (!txp) return cb(new ClientError('Transaction proposal not found'));
var action = _.find(txp.actions, {
@ -507,7 +510,7 @@ CopayServer.prototype.signTx = function(opts, cb) {
self.storage.storeTx(opts.walletId, txp, function(err) {
if (err) return cb(err);
return cb(null,txp);
return cb(null, txp);
});
});
} else {
@ -530,7 +533,10 @@ CopayServer.prototype.rejectTx = function(opts, cb) {
Utils.checkRequired(opts, ['walletId', 'copayerId', 'txProposalId']);
self.fetchTx(opts.walletId, opts.txProposalId, function(err, txp) {
self.getTx({
walletId: opts.walletId,
id: opts.txProposalId
}, function(err, txp) {
if (err) return cb(err);
if (!txp) return cb(new ClientError('Transaction proposal not found'));
var action = _.find(txp.actions, {