Browse Source

sign TX dummy test passing

activeAddress
Matias Alejo Garcia 10 years ago
parent
commit
06ae34a71f
  1. 12
      lib/server.js

12
lib/server.js

@ -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, {

Loading…
Cancel
Save