fix update wallet settings

This commit is contained in:
Gabriel Bazán 2016-09-01 16:48:46 -03:00
commit d911dd9d0b

View file

@ -32,10 +32,10 @@ angular.module('copayApp.services')
var defaults = configService.getDefaults(); var defaults = configService.getDefaults();
var config = configService.getSync(); 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.name = config.aliasFor && (config.aliasFor[wallet.id] || wallet.credentials.walletName);
wallet.color = config.colorFor[wallet.id] || '#4A90E2'; wallet.color = config.colorFor && (config.colorFor[wallet.id] || '#4A90E2');
} }
root.setBackupFlag = function(walletId) { root.setBackupFlag = function(walletId) {
@ -431,8 +431,8 @@ angular.module('copayApp.services')
// check if exist // check if exist
if (lodash.find(root.profile.credentials, { if (lodash.find(root.profile.credentials, {
'walletId': walletData.walletId 'walletId': walletData.walletId
})) { })) {
return cb(gettext('Cannot join the same wallet more that once')); return cb(gettext('Cannot join the same wallet more that once'));
} }
} catch (ex) { } catch (ex) {
@ -822,7 +822,6 @@ angular.module('copayApp.services')
}; };
}); });
var finale = shown; // GROUPING DISABLED! var finale = shown; // GROUPING DISABLED!
// var finale = [], // var finale = [],
@ -885,7 +884,7 @@ angular.module('copayApp.services')
} }
if (j == l) { if (j == l) {
notifications = lodash.sortBy(notifications, 'createdOn'); 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)); return cb(null, process(notifications));
}; };
}); });