file api working. Migration script missing

This commit is contained in:
Matias Alejo Garcia 2015-04-24 16:39:12 -03:00
commit 1f6596a5ad
9 changed files with 180 additions and 50 deletions

View file

@ -426,6 +426,19 @@ angular.module('copayApp.controllers').controller('indexController', function($r
}
};
self.deviceError = function (err) {
if (isCordova) {
navigator.notification.confirm(
err,
function() {},
'Device Error', ['OK']
);
} else {
alert(err);
}
};
self.recreate = function(cb) {
var fc = profileService.focusedClient;
self.setOngoingProcess('recreating', true);
@ -563,6 +576,11 @@ angular.module('copayApp.controllers').controller('indexController', function($r
$rootScope.$apply();
});
$rootScope.$on('Local/DeviceError', function(event, err) {
self.deviceError(err);
$rootScope.$apply();
});
$rootScope.$on('Local/ClientError', function(event, err) {
if (err.code && err.code === 'NOTAUTHORIZED') {
// Show not error, just redirect to home (where the recreate option is shown)