From d911dd9d0bd5c890da26f2a3cbc947d0c7c52059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Thu, 1 Sep 2016 16:48:46 -0300 Subject: [PATCH] fix update wallet settings --- src/js/services/profileService.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js index a5f5c8769..abb066d6d 100644 --- a/src/js/services/profileService.js +++ b/src/js/services/profileService.js @@ -32,10 +32,10 @@ angular.module('copayApp.services') var defaults = configService.getDefaults(); var config = configService.getSync(); - wallet.usingCustomBWS = config.bwsFor[wallet.id] && (config.bwsFor[wallet.id] != defaults.bws.url); + wallet.usingCustomBWS = config.bwsFor && config.bwsFor[wallet.id] && (config.bwsFor[wallet.id] != defaults.bws.url); - wallet.name = config.aliasFor[wallet.id] || wallet.credentials.walletName; - wallet.color = config.colorFor[wallet.id] || '#4A90E2'; + wallet.name = config.aliasFor && (config.aliasFor[wallet.id] || wallet.credentials.walletName); + wallet.color = config.colorFor && (config.colorFor[wallet.id] || '#4A90E2'); } root.setBackupFlag = function(walletId) { @@ -431,8 +431,8 @@ angular.module('copayApp.services') // check if exist if (lodash.find(root.profile.credentials, { - 'walletId': walletData.walletId - })) { + 'walletId': walletData.walletId + })) { return cb(gettext('Cannot join the same wallet more that once')); } } catch (ex) { @@ -822,7 +822,6 @@ angular.module('copayApp.services') }; }); - var finale = shown; // GROUPING DISABLED! // var finale = [], @@ -885,7 +884,7 @@ angular.module('copayApp.services') } if (j == l) { notifications = lodash.sortBy(notifications, 'createdOn'); - notifications = lodash.compact(lodash.flatten(notifications)).slice(0,MAX); + notifications = lodash.compact(lodash.flatten(notifications)).slice(0, MAX); return cb(null, process(notifications)); }; });