display a spinner when signing with a PIN

This commit is contained in:
Gustavo Maximiliano Cortez 2014-12-08 12:58:05 -03:00
commit 2be4600509
3 changed files with 6 additions and 1 deletions

View file

@ -72,6 +72,7 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc
var credentials = pinService.get(pin, function(err, credentials) {
if (err || !credentials) {
$rootScope.starting = false;
$scope.loading = null;
$scope.error = 'Wrong PIN';
return;
}

View file

@ -57,7 +57,9 @@ angular.module('copayApp.services')
set: function(newValue) {
this['_' + name] = newValue;
scope.error = null;
scope.loading = null;
if (newValue && newValue.length == 4) {
scope.loading = true;
$timeout(function() {
return cb(newValue);
}, 30);