handle notauthorized

This commit is contained in:
Matias Alejo Garcia 2015-04-13 11:57:58 -03:00
parent 461b73f63e
commit ff8560208b
2 changed files with 6 additions and 2 deletions

View File

@ -421,7 +421,12 @@ angular.module('copayApp.controllers').controller('indexController', function($r
});
$rootScope.$on('Local/ClientError', function(event, err) {
self.clientError = err;
if (err.code && err.code === 'NOTAUTHORIZED') {
// Show not error, just redirect to home (where the recreate option is shown)
go.walletHome();
} else {
self.clientError = err;
}
$rootScope.$apply();
});

View File

@ -14,7 +14,6 @@ if (window && window.navigator) {
angular
.module('copayApp')
.config(function(bwcServiceProvider, $stateProvider, $urlRouterProvider) {
bwcServiceProvider.setBaseUrl('http://192.168.1.102:3001/bws/api');
$urlRouterProvider.otherwise('/');
$stateProvider