ref $window.appConfig as service
This commit is contained in:
parent
58247503a5
commit
4b3f9a6c99
21 changed files with 57 additions and 52 deletions
5
src/js/services/appConfigService.js
Normal file
5
src/js/services/appConfigService.js
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.services').factory('appConfigService', function($window) {
|
||||
return $window.appConfig;
|
||||
});
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
angular.module('copayApp.services')
|
||||
.factory('backupService', function backupServiceFactory($log, $timeout, $stateParams, profileService, sjcl, $window) {
|
||||
.factory('backupService', function backupServiceFactory($log, $timeout, $stateParams, profileService, sjcl, appConfigService) {
|
||||
|
||||
var root = {};
|
||||
|
||||
|
|
@ -80,7 +80,7 @@ angular.module('copayApp.services')
|
|||
|
||||
var walletName = (wallet.alias || '') + (wallet.alias ? '-' : '') + wallet.credentials.walletName;
|
||||
if (opts.noSign) walletName = walletName + '-noSign'
|
||||
var filename = walletName + '-' + $window.appConfig.nameCase + 'backup.aes.json';
|
||||
var filename = walletName + '-' + appConfigService.nameCase + 'backup.aes.json';
|
||||
_download(ew, filename, cb)
|
||||
};
|
||||
return root;
|
||||
|
|
|
|||
|
|
@ -121,17 +121,17 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
|||
} else {
|
||||
goToAmountPage(data);
|
||||
}
|
||||
} else if (data && data.indexOf($window.appConfig.name + '://glidera') === 0) {
|
||||
} else if (data && data.indexOf(appConfigService.name + '://glidera') === 0) {
|
||||
return $state.go('uriglidera', {
|
||||
url: data
|
||||
});
|
||||
} else if (data && data.indexOf($window.appConfig.name + '://coinbase') === 0) {
|
||||
} else if (data && data.indexOf(appConfigService.name + '://coinbase') === 0) {
|
||||
return $state.go('uricoinbase', {
|
||||
url: data
|
||||
});
|
||||
|
||||
// BitPayCard Authentication
|
||||
} else if (data && data.indexOf($window.appConfig.name + '://') === 0) {
|
||||
} else if (data && data.indexOf(appConfigService.name + '://') === 0) {
|
||||
var secret = getParameterByName('secret', data);
|
||||
var email = getParameterByName('email', data);
|
||||
var otp = getParameterByName('otp', data);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
angular.module('copayApp.services')
|
||||
.factory('logHeader', function($window, $log, platformInfo) {
|
||||
$log.info($window.appConfig.nameCase + ' v' + window.version + ' #' + window.commitHash);
|
||||
$log.info('Client: '+ JSON.stringify(platformInfo) );
|
||||
.factory('logHeader', function($window, appConfigService, $log, platformInfo) {
|
||||
$log.info(appConfigService.nameCase + ' v' + $window.version + ' #' + $window.commitHash);
|
||||
$log.info('Client: ' + JSON.stringify(platformInfo));
|
||||
return {};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue