mirror of https://github.com/BTCPrivate/copay.git
Added jsdoc
This commit is contained in:
parent
78c1d40986
commit
2c81f2ab8c
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue