apply pin logic to modal view

This commit is contained in:
Gabriel Bazán 2017-05-09 12:36:32 -03:00
commit 9b21292a68
6 changed files with 45 additions and 361 deletions

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('lockSetupController', function($state, $scope, $timeout, $log, configService, gettextCatalog, fingerprintService, profileService, lodash) {
angular.module('copayApp.controllers').controller('lockSetupController', function($state, $scope, $timeout, $log, configService, gettextCatalog, fingerprintService, profileService, lodash, applicationService) {
function init() {
$scope.options = [
@ -120,9 +120,7 @@ angular.module('copayApp.controllers').controller('lockSetupController', functio
function disableMethod(method) {
switch (method) {
case 'pin':
$state.transitionTo('tabs.pin', {
action: 'disable'
});
applicationService.pinModal('disable');
break;
case 'fingerprint':
fingerprintService.check('unlockingApp', function(err) {
@ -136,9 +134,7 @@ angular.module('copayApp.controllers').controller('lockSetupController', functio
function enableMethod(method) {
switch (method) {
case 'pin':
$state.transitionTo('tabs.pin', {
action: 'setup'
});
applicationService.pinModal('setup');
break;
case 'fingerprint':
saveConfig('fingerprint');