better error on recreate2
This commit is contained in:
parent
dc7676e4b0
commit
e844086ac4
1 changed files with 4 additions and 5 deletions
|
|
@ -246,13 +246,13 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
};
|
};
|
||||||
|
|
||||||
self.handleError = function(err) {
|
self.handleError = function(err) {
|
||||||
$log.debug('ERROR:', err);
|
$log.warn('Client ERROR:', err);
|
||||||
if (err.code === 'NOTAUTHORIZED') {
|
if (err.code === 'NOTAUTHORIZED') {
|
||||||
$scope.$emit('Local/NotAuthorized');
|
$scope.$emit('Local/NotAuthorized');
|
||||||
} else if (err.code === 'NOTFOUND') {
|
} else if (err.code === 'NOTFOUND') {
|
||||||
$scope.$emit('Local/BWSNotFound');
|
$scope.$emit('Local/BWSNotFound');
|
||||||
} else {
|
} else {
|
||||||
$scope.$emit('Local/ClientError', err);
|
$scope.$emit('Local/ClientError', (err.error ? err.error : err);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
self.openWallet = function() {
|
self.openWallet = function() {
|
||||||
|
|
@ -448,8 +448,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
self.setOngoingProcess('recreating', false);
|
self.setOngoingProcess('recreating', false);
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
$log.error(err);
|
self.handleError(err);
|
||||||
self.clientError('Could not recreate wallet:' + (err.error ? err.error : err));
|
|
||||||
$rootScope.$apply();
|
$rootScope.$apply();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -486,7 +485,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
if (err) {
|
if (err) {
|
||||||
if (self.walletId == walletId)
|
if (self.walletId == walletId)
|
||||||
self.setOngoingProcess('scanning', false);
|
self.setOngoingProcess('scanning', false);
|
||||||
self.clientError('Could not scan wallet:' + err);
|
self.handleError(err);
|
||||||
$rootScope.$apply();
|
$rootScope.$apply();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue