diff --git a/js/controllers/transactions.js b/js/controllers/transactions.js index 71d285bff..fdcb03e07 100644 --- a/js/controllers/transactions.js +++ b/js/controllers/transactions.js @@ -22,7 +22,7 @@ angular.module('copay.transactions').controller('TransactionsController', tx.outs.forEach(function(o) { var addr = bitcore.Address.fromScriptPubKey(o.getScript(), config.networkName)[0].toString(); - if (!w.addressIsOwn(addr, true)) { + if (!w.addressIsOwn(addr, {excludeMain:true})) { outs.push({ address: addr, value: bitcore.util.valueToBigInt(o.getValue())/bitcore.util.COIN, diff --git a/js/models/core/Wallet.js b/js/models/core/Wallet.js index 8307baaa5..7cfc6033d 100644 --- a/js/models/core/Wallet.js +++ b/js/models/core/Wallet.js @@ -417,12 +417,12 @@ Wallet.prototype.getAddressesStr = function(opts) { }); }; -Wallet.prototype.getAddressesInfo = function(excludeChange) { - return this.publicKeyRing.getAddressesInfo(excludeChange); +Wallet.prototype.getAddressesInfo = function(opts) { + return this.publicKeyRing.getAddressesInfo(opts); }; -Wallet.prototype.addressIsOwn = function(addrStr, excludeChange) { - var addrList = this.getAddressesStr({excludeMain:true}); +Wallet.prototype.addressIsOwn = function(addrStr, opts) { + var addrList = this.getAddressesStr(opts); var l = addrList.length; var ret = false; diff --git a/test/test.Wallet.js b/test/test.Wallet.js index 2d6fbfef1..60bdb9359 100644 --- a/test/test.Wallet.js +++ b/test/test.Wallet.js @@ -144,6 +144,9 @@ describe('Wallet model', function() { var l = w.getAddressesStr(); for (var i=0; i