Added jsdoc

This commit is contained in:
Matias Pando 2014-11-28 10:43:01 -03:00
parent 78c1d40986
commit 2c81f2ab8c
1 changed files with 4 additions and 24 deletions

View File

@ -1367,30 +1367,6 @@ Wallet.prototype.generateAddress = function(isChange) {
return addr;
};
/**
* @desc Retrieve all the Transaction proposals (see {@link TxProposals})
* @return {Object[]} each object returned represents a transaction proposal, with two additional
* booleans: <tt>signedByUs</tt> and <tt>rejectedByUs</tt>. An optional third boolean signals
* whether the transaction was finally rejected (<tt>finallyRejected</tt> set to true).
*/
Wallet.prototype.getTxProposals = function() {
var ret = [];
var self = this;
var copayers = self.getRegisteredCopayerIds();
var myId = self.getMyCopayerId();
_.each(self.txProposals.txps, function(txp, ntxid) {
txp.signedByUs = txp.signedBy[myId] ? true : false;
txp.rejectedByUs = txp.rejectedBy[self.getMyCopayerId()] ? true : false;
txp.finallyRejected = self.totalCopayers - txp.rejectCount < self.requiredCopayers;
txp.isPending = !txp.finallyRejected && !txp.sentTxid;
if (!txp.readonly || txp.finallyRejected || txp.sentTs) {
ret.push(txp);
}
});
return ret;
};
/**
* @desc get list of actions (see {@link getPendingTxProposals})
@ -2567,6 +2543,10 @@ Wallet.prototype.isComplete = function() {
return this.publicKeyRing.isComplete();
};
/**
* @desc Return a list of transactions on CSV format
* @return {Object} the list of transactions on CSV format
*/
Wallet.prototype.getTransactionHistoryCsv = function(cb) {
var self = this;
self.getTransactionHistory(function(err, res) {