mirror of https://github.com/BTCPrivate/copay.git
Fixes error codes against Insight
This commit is contained in:
parent
9788235003
commit
5f035a9680
|
@ -37,6 +37,9 @@ InsightStorage.prototype.getItem = function(name, callback) {
|
||||||
if (err) {
|
if (err) {
|
||||||
return callback('Connection error');
|
return callback('Connection error');
|
||||||
}
|
}
|
||||||
|
if (response.statusCode === 403) {
|
||||||
|
return callback('PNOTFOUND: Profile not found');
|
||||||
|
}
|
||||||
if (response.statusCode !== 200) {
|
if (response.statusCode !== 200) {
|
||||||
return callback('Connection error');
|
return callback('Connection error');
|
||||||
}
|
}
|
||||||
|
@ -61,6 +64,9 @@ InsightStorage.prototype.setItem = function(name, value, callback) {
|
||||||
if (err) {
|
if (err) {
|
||||||
return callback('Connection error');
|
return callback('Connection error');
|
||||||
}
|
}
|
||||||
|
if (response.statusCode === 409) {
|
||||||
|
return callback('Invalid username or password');
|
||||||
|
}
|
||||||
if (response.statusCode !== 200) {
|
if (response.statusCode !== 200) {
|
||||||
return callback('Unable to store data on insight');
|
return callback('Unable to store data on insight');
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ angular.module('copayApp.services')
|
||||||
copay.Wallet.checkIfExistsAny({
|
copay.Wallet.checkIfExistsAny({
|
||||||
pluginManager: pluginManager,
|
pluginManager: pluginManager,
|
||||||
}, function(anyWallet) {
|
}, function(anyWallet) {
|
||||||
scope.retreiving = false;
|
scope.loading = false;
|
||||||
scope.anyProfile = anyProfile ? true : false;
|
scope.anyProfile = anyProfile ? true : false;
|
||||||
scope.anyWallet = anyWallet ? true : false;
|
scope.anyWallet = anyWallet ? true : false;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="createProfile" ng-controller="CreateProfileController">
|
<div class="createProfile" ng-controller="CreateProfileController">
|
||||||
<div data-alert class="loading-screen" ng-show="retreiving">
|
<div data-alert class="loading-screen" ng-show="loading">
|
||||||
<i class="size-60 fi-bitcoin-circle icon-rotate spinner"></i>
|
<i class="size-60 fi-bitcoin-circle icon-rotate spinner"></i>
|
||||||
<span translate>Retreiving information from storage...</span>
|
<span translate>Retreiving information from storage...</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="home" ng-controller="HomeController">
|
<div class="home" ng-controller="HomeController">
|
||||||
|
|
||||||
<div data-alert class="loading-screen" ng-show="retreiving">
|
<div data-alert class="loading-screen" ng-show="loading">
|
||||||
<i class="size-60 fi-bitcoin-circle icon-rotate spinner"></i>
|
<i class="size-60 fi-bitcoin-circle icon-rotate spinner"></i>
|
||||||
<span translate>Retreiving information from storage...</span>
|
<span translate>Retreiving information from storage...</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue