fix conflicts

This commit is contained in:
Matias Alejo Garcia 2014-05-01 11:04:21 -03:00
parent 79fd185230
commit 84637bd12d
3 changed files with 8 additions and 5 deletions

View File

@ -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,

View File

@ -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;

View File

@ -144,6 +144,9 @@ describe('Wallet model', function() {
var l = w.getAddressesStr();
for (var i=0; i<l.length; i++)
w.addressIsOwn(l[i]).should.equal(true);
w.addressIsOwn(l[0], {excludeMain:true}).should.equal(false);
w.addressIsOwn('mmHqhvTVbxgJTnePa7cfweSRjBCy9bQQXJ').should.equal(false);
w.addressIsOwn('mgtUfP9sTJ6vPLoBxZLPEccGpcjNVryaCX').should.equal(false);
});