Commit 685da94a authored by dev0tion's avatar dev0tion

Temporary catch all statuses

parent 3fa0b4c1
......@@ -22,7 +22,7 @@ export class AppComponent implements OnInit {
this.apiService.getWalletStatus()
.subscribe(
response => {
if (response.status === 200) {
if (response.status >= 200 && response.status < 400) {
this.responseMessage = response;
this.router.navigate(['/login']);
}
......
......@@ -27,14 +27,14 @@ export class LoginComponent implements OnInit {
this.apiService.loadWallet(this.walletLoad)
.subscribe(
response => {
if (response.status === 200) {
if (response.status >= 200 && response.status < 400) {
this.responseMessage = response;
this.router.navigate['/wallet']
}
},
error => {
this.errorMessage = <any>error;
if (error.status > 400) {
if (error.status >= 400) {
alert(this.errorMessage);
console.log(this.errorMessage);
}
......
......@@ -30,12 +30,12 @@ export class CreateComponent {
.createWallet(this.newWallet)
.subscribe(
response => {
if (response.status === 200){
if (response.status >= 200 && response.status < 400){
this.responseMessage = response;
}
},
error => {
if (error.status > 400){
if (error.status >= 400) {
this.errorMessage = error;
console.log(this.errorMessage);
}
......
......@@ -31,12 +31,12 @@ export class RecoverComponent implements OnInit {
.recoverWallet(this.walletRecovery)
.subscribe(
response => {
if (response.status === 200) {
if (response.status >= 200 && response.status < 400) {
this.responseMessage = response;
}
},
error => {
if(error.status > 400) {
if (error.status >= 400) {
this.errorMessage = error;
console.log(this.errorMessage);
}
......
......@@ -22,12 +22,12 @@ export class HistoryComponent {
this.apiService.getWalletHistory()
.subscribe(
response => {
if (response.status === 200) {
if (response.status >= 200 && response.status < 400) {
this.transactions = response.history;
}
},
error => {
if (error.status === 400) {
if (error.status >= 400) {
this.errorMessage = <any>error;
console.log(this.errorMessage);
}
......
......@@ -22,14 +22,14 @@ export class DashboardComponent {
this.apiService.getWalletBalance()
.subscribe(
response => {
if (response.status === 200) {
if (response.status >= 200 && response.status < 400) {
this.balanceResponse = response
this.confirmedBalance = this.balanceResponse.confirmed;
this.unconfirmedBalance = this.balanceResponse.unconfirmed;
}
},
error => {
if (error.status > 400) {
if (error.status >= 400) {
this.errorMessage = <any>error;
console.log(this.errorMessage);
}
......
......@@ -22,12 +22,12 @@ export class ReceiveComponent {
this.apiService.getUnusedReceiveAddresses()
.subscribe(
response => {
if (response.status === 200) {
if (response.status >= 200 && response.status < 400) {
this.addresses = response.addresses;
}
},
error => {
if (error.status > 400) {
if (error.status >= 400) {
this.errorMessage = <any>error;
console.log(this.errorMessage);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment