From 10938b43d81939859ff03e66c3abafe8359b6e1a Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Tue, 25 Nov 2014 13:58:10 -0300 Subject: [PATCH] fixes on jsdoc --- js/models/TxProposal.js | 3 +++ js/models/TxProposals.js | 1 - js/models/Wallet.js | 7 +++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/js/models/TxProposal.js b/js/models/TxProposal.js index bccb7f618..32afe115b 100644 --- a/js/models/TxProposal.js +++ b/js/models/TxProposal.js @@ -419,6 +419,9 @@ TxProposal.prototype.setCopayers = function(senderId, keyMap, readOnlyPeers) { // merge will not merge any metadata. TxProposal.prototype.merge = function(incoming) { + preconditions.checkArgument(_.isFunction(incoming._sync)); + incoming._sync(); + // Note that all inputs must have the same number of signatures, so checking // one (0) is OK. var before = this._inputSigners[0].length; diff --git a/js/models/TxProposals.js b/js/models/TxProposals.js index 2fb992acc..a1b890f7d 100644 --- a/js/models/TxProposals.js +++ b/js/models/TxProposals.js @@ -98,7 +98,6 @@ TxProposals.prototype.toObj = function() { TxProposals.prototype.merge = function(inObj, builderOpts) { var incomingTx = TxProposal.fromUntrustedObj(inObj, builderOpts); - incomingTx._sync(); var myTxps = this.txps; var ntxid = incomingTx.getId(); diff --git a/js/models/Wallet.js b/js/models/Wallet.js index b54be9e19..046123e1a 100644 --- a/js/models/Wallet.js +++ b/js/models/Wallet.js @@ -2081,15 +2081,14 @@ Wallet.prototype.maxRejectCount = function() { /** * @callback getUnspentCallback - * @TODO: Document this better + * @desc Get a list of unspent transaction outputs * @param {string} error * @param {Object[]} safeUnspendList * @param {Object[]} unspentList - */ -/* @ TODO add cached? - * @desc Get a list of unspent transaction outputs * @param {getUnspentCallback} cb */ + +// TODO: Can we add cache to getUnspent? Wallet.prototype.getUnspent = function(cb) { var self = this; this.blockchain.getUnspent(this.getAddressesStr(), function(err, unspentList) {