Merge pull request #89 from matiu/feature/ux2

fix p2p connecting
This commit is contained in:
Manuel Aráoz 2014-04-18 11:29:27 -03:00
commit cf4140ab2b
6 changed files with 42 additions and 11 deletions

View file

@ -311,6 +311,22 @@ Wallet.prototype.getAddressesStr = function(onlyMain) {
return ret;
};
Wallet.prototype.addressIsOwn = function(addrStr) {
var addrList = this.getAddressesStr();
var l = addrList.length;
var ret = false;
for(var i=0; i<l; i++) {
if (addrList[i] === addrStr) {
ret = true;
break;
}
}
return ret;
};
Wallet.prototype.getTotalBalance = function(cb) {
this.getBalance(this.getAddressesStr(), function(balance) {
return cb(balance);