Wallet/src/js/services/pincodeService.js

26 lines
730 B
JavaScript
Raw Normal View History

2017-03-01 17:29:39 -03:00
'use strict';
angular.module('copayApp.services').factory('pincodeService', function($log, $rootScope, $ionicModal, configService) {
var root = {};
2017-03-02 16:32:08 -03:00
root.lockChange = function(opts) {
2017-03-01 17:29:39 -03:00
var scope = $rootScope.$new(true);
2017-03-02 16:49:07 -03:00
scope.fromSettings = opts.fromSettings;
2017-03-02 16:32:08 -03:00
scope.locking = opts.locking;
2017-03-01 17:29:39 -03:00
$ionicModal.fromTemplateUrl('views/modals/pincode.html', {
scope: scope,
backdropClickToClose: false,
hardwareBackButtonClose: false
}).then(function(modal) {
scope.pincodeModal = modal;
scope.pincodeModal.show();
});
};
root.isLocked = function() {
var config = configService.getSync();
return config.pincode ? config.pincode.enabled : false;
};
return root;
});