Set touch id to spend funds

This commit is contained in:
Gustavo Maximiliano Cortez 2015-10-07 16:17:19 -03:00
commit bc41495610
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
6 changed files with 199 additions and 97 deletions

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('indexController', function($rootScope, $scope, $log, $filter, $timeout, lodash, go, profileService, configService, isCordova, rateService, storageService, addressService, gettext, amMoment, nodeWebkit, addonManager, feeService, isChromeApp, bwsError, txFormatService, uxLanguage, $state, glideraService, isMobile) {
angular.module('copayApp.controllers').controller('indexController', function($rootScope, $scope, $log, $filter, $timeout, lodash, go, profileService, configService, isCordova, rateService, storageService, addressService, gettext, gettextCatalog, amMoment, nodeWebkit, addonManager, feeService, isChromeApp, bwsError, txFormatService, uxLanguage, $state, glideraService, isMobile) {
var self = this;
self.isCordova = isCordova;
self.isChromeApp = isChromeApp;
@ -1152,6 +1152,20 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.setTab(tab, reset);
});
$rootScope.$on('Local/RequestTouchid', function(event, cb) {
window.plugins.touchid.verifyFingerprint(
gettextCatalog.getString('Scan your fingerprint please'),
function(msg) {
// OK
return cb();
},
function(msg) {
// ERROR
return cb(gettext('Invalid Touch ID'));
}
);
});
$rootScope.$on('Local/ShowAlert', function(event, msg, cb) {
self.showErrorPopup(msg, cb);
});