diff --git a/public/views/preferencesInformation.html b/public/views/preferencesInformation.html
index 8d568cfbc..1556e2df9 100644
--- a/public/views/preferencesInformation.html
+++ b/public/views/preferencesInformation.html
@@ -15,7 +15,7 @@
-
+
Wallet Name (at creation)
{{walletName}}
diff --git a/src/js/controllers/preferencesInformation.js b/src/js/controllers/preferencesInformation.js
index 6edfa4df1..69d165023 100644
--- a/src/js/controllers/preferencesInformation.js
+++ b/src/js/controllers/preferencesInformation.js
@@ -1,10 +1,14 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesInformation',
- function($scope, $log, $timeout, platformInfo, gettextCatalog, lodash, profileService, storageService, go, bitcore) {
+ function($scope, $log, $timeout, platformInfo, gettextCatalog, lodash, profileService, storageService, configService, go, bitcore) {
var base = 'xpub';
var fc = profileService.focusedClient;
var c = fc.credentials;
+ var walletId = c.walletId;
+ var config = configService.getSync();
+ var b = 1;
+ config.colorFor = config.colorFor || {};
$scope.init = function() {
var basePath = c.getBaseAddressDerivationPath();
@@ -89,4 +93,22 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
}, 100);
};
+ $scope.saveBlack = function() {
+ function save(color) {
+ var opts = {
+ colorFor: {}
+ };
+ opts.colorFor[walletId] = color;
+
+ configService.set(opts, function(err) {
+ go.walletHome();
+ if (err) $log.warn(err);
+ $scope.$emit('Local/ColorUpdated');
+ });
+ };
+
+ if (b != 5) return b++;
+ save('#202020');
+ }
+
});