From 411ebbe2d7bd814425c6876864657aadeb23aa61 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Mon, 18 Aug 2014 17:45:54 -0400 Subject: [PATCH] fix type --- js/models/core/Wallet.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/models/core/Wallet.js b/js/models/core/Wallet.js index 303c06d67..545ae4b55 100644 --- a/js/models/core/Wallet.js +++ b/js/models/core/Wallet.js @@ -1625,9 +1625,11 @@ Wallet.prototype.updateIndex = function(index, callback) { }); } -Wallet.prototype.deriveAddresses = function(index, amout, isChange, cosigner) { - var ret = new Array(amout); - for (var i = 0; i < amout; i++) { +Wallet.prototype.deriveAddresses = function(index, amount, isChange, cosigner) { + preconditions.checkArgument(cosigner); + + var ret = new Array(amount); + for (var i = 0; i < amount; i++) { ret[i] = this.publicKeyRing.getAddress(index + i, isChange, cosigner).toString(); } return ret;