|
|
@ -569,13 +569,13 @@ WalletService.prototype.createTx = function(opts, cb) { |
|
|
|
/** |
|
|
|
* Retrieves a tx from storage. |
|
|
|
* @param {Object} opts |
|
|
|
* @param {string} opts.id - The tx id. |
|
|
|
* @param {string} opts.txProposalId - The tx id. |
|
|
|
* @returns {Object} txProposal |
|
|
|
*/ |
|
|
|
WalletService.prototype.getTx = function(opts, cb) { |
|
|
|
var self = this; |
|
|
|
|
|
|
|
self.storage.fetchTx(self.walletId, opts.id, function(err, txp) { |
|
|
|
self.storage.fetchTx(self.walletId, opts.txProposalId, function(err, txp) { |
|
|
|
if (err) return cb(err); |
|
|
|
if (!txp) return cb(new ClientError('Transaction proposal not found')); |
|
|
|
return cb(null, txp); |
|
|
@ -614,7 +614,7 @@ WalletService.prototype.removePendingTx = function(opts, cb) { |
|
|
|
Utils.runLocked(self.walletId, cb, function(cb) { |
|
|
|
|
|
|
|
self.getTx({ |
|
|
|
id: opts.txProposalId, |
|
|
|
txProposalId: opts.txProposalId, |
|
|
|
}, function(err, txp) { |
|
|
|
if (err) return cb(err); |
|
|
|
|
|
|
@ -666,7 +666,7 @@ WalletService.prototype.signTx = function(opts, cb) { |
|
|
|
if (err) return cb(err); |
|
|
|
|
|
|
|
self.getTx({ |
|
|
|
id: opts.txProposalId |
|
|
|
txProposalId: opts.txProposalId |
|
|
|
}, function(err, txp) { |
|
|
|
if (err) return cb(err); |
|
|
|
|
|
|
@ -719,7 +719,7 @@ WalletService.prototype.broadcastTx = function(opts, cb) { |
|
|
|
if (err) return cb(err); |
|
|
|
|
|
|
|
self.getTx({ |
|
|
|
id: opts.txProposalId |
|
|
|
txProposalId: opts.txProposalId |
|
|
|
}, function(err, txp) { |
|
|
|
if (err) return cb(err); |
|
|
|
|
|
|
@ -761,7 +761,7 @@ WalletService.prototype.rejectTx = function(opts, cb) { |
|
|
|
return cb(new ClientError('Required argument missing')); |
|
|
|
|
|
|
|
self.getTx({ |
|
|
|
id: opts.txProposalId |
|
|
|
txProposalId: opts.txProposalId |
|
|
|
}, function(err, txp) { |
|
|
|
if (err) return cb(err); |
|
|
|
|
|
|
|