Merge pull request #2318 from matiaspando/iss2308

To avoid errors on invalid address
This commit is contained in:
Matias Alejo Garcia 2015-01-19 11:33:47 -03:00
commit e8d3de7460
5 changed files with 202 additions and 7 deletions

View file

@ -62,7 +62,7 @@ angular.module('copayApp.controllers').controller('ReceiveController',
var w = $rootScope.wallet;
var balance = w.balanceInfo.balanceByAddr;
var addresses = w.getAddressesOrderer();
var addresses = w.getAddressesOrdered();
if (addresses) {
$scope.addrLength = addresses.length;

View file

@ -358,10 +358,6 @@ Network.prototype.getOnlinePeerIDs = function() {
return this.connectedPeers;
};
Network.prototype.getPeer = function() {
return this.peer;
};
Network.prototype.getCopayerIds = function() {
if (this.allowedCopayerIds) {

View file

@ -658,7 +658,7 @@ Wallet.prototype._onAddressBook = function(senderId, data) {
var self = this,
hasChange;
_.each(data.addressBook, function(value, key) {
if (key && !self.addressBook[key] && Address.validate(key)) {
if (key && !self.addressBook[key] && _.isString(key) && Address.validate(key)) {
self.addressBook[key] = _.pick(value, ['createdTs', 'label']);