sign TX dummy test passing
This commit is contained in:
parent
0758c2e842
commit
06ae34a71f
|
@ -485,7 +485,10 @@ CopayServer.prototype.signTx = function(opts, cb) {
|
||||||
|
|
||||||
Utils.checkRequired(opts, ['walletId', 'copayerId', 'txProposalId', 'signatures']);
|
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 (err) return cb(err);
|
||||||
if (!txp) return cb(new ClientError('Transaction proposal not found'));
|
if (!txp) return cb(new ClientError('Transaction proposal not found'));
|
||||||
var action = _.find(txp.actions, {
|
var action = _.find(txp.actions, {
|
||||||
|
@ -507,7 +510,7 @@ CopayServer.prototype.signTx = function(opts, cb) {
|
||||||
self.storage.storeTx(opts.walletId, txp, function(err) {
|
self.storage.storeTx(opts.walletId, txp, function(err) {
|
||||||
if (err) return cb(err);
|
if (err) return cb(err);
|
||||||
|
|
||||||
return cb(null,txp);
|
return cb(null, txp);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -530,7 +533,10 @@ CopayServer.prototype.rejectTx = function(opts, cb) {
|
||||||
|
|
||||||
Utils.checkRequired(opts, ['walletId', 'copayerId', 'txProposalId']);
|
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 (err) return cb(err);
|
||||||
if (!txp) return cb(new ClientError('Transaction proposal not found'));
|
if (!txp) return cb(new ClientError('Transaction proposal not found'));
|
||||||
var action = _.find(txp.actions, {
|
var action = _.find(txp.actions, {
|
||||||
|
|
Loading…
Reference in New Issue