Update: Adds a Bitcoin Core Wallet setting which hides BTC wallets when disabled
This commit is contained in:
parent
7bf656a0a3
commit
780951eb2f
12 changed files with 108 additions and 9 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.services').factory('configService', function(storageService, lodash, $log, $timeout, $rootScope, platformInfo) {
|
||||
angular.module('copayApp.services').factory('configService', function(storageService, lodash, $log, $timeout, $rootScope, $injector, platformInfo) {
|
||||
var root = {};
|
||||
|
||||
var isWindowsPhoneApp = platformInfo.isCordova && platformInfo.isWP;
|
||||
|
|
@ -84,6 +84,10 @@ angular.module('copayApp.services').factory('configService', function(storageSer
|
|||
enabled: true,
|
||||
},
|
||||
|
||||
displayBitcoinCore: {
|
||||
enabled: false,
|
||||
},
|
||||
|
||||
hideNextSteps: {
|
||||
enabled: isWindowsPhoneApp ? true : false,
|
||||
},
|
||||
|
|
@ -245,6 +249,18 @@ angular.module('copayApp.services').factory('configService', function(storageSer
|
|||
return lodash.clone(defaultConfig);
|
||||
};
|
||||
|
||||
root.checkIfConfigIsSet = function(key) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
storageService.getConfig(function(err, localConfig) {
|
||||
if (localConfig) {
|
||||
configCache = JSON.parse(localConfig);
|
||||
resolve(configCache.hasOwnProperty(key));
|
||||
} else {
|
||||
reject(false);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
return root;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue