Commit 7731844c authored by dev0tion's avatar dev0tion

Add blank popup workaround to status bar

parent af74d078
......@@ -25,11 +25,11 @@ export class StatusBarComponent implements OnInit {
constructor(private apiService: ApiService, private globalService: GlobalService) { }
ngOnInit() {
this.getGeneralWalletInfo()
this.startSubscriptions();
}
ngOnDestroy() {
this.generalWalletInfoSubscription.unsubscribe();
this.cancelSubscriptions();
}
getGeneralWalletInfo() {
......@@ -66,12 +66,26 @@ export class StatusBarComponent implements OnInit {
console.log(error);
}
else {
alert(error.json().errors[0].description);
if (error.json().errors[0].description) {
alert(error.json().errors[0].description);
} else {
this.cancelSubscriptions();
this.startSubscriptions();
}
}
}
}
)
;
}
};
private cancelSubscriptions() {
if(this.generalWalletInfoSubscription) {
this.generalWalletInfoSubscription.unsubscribe();
}
};
private startSubscriptions() {
this.getGeneralWalletInfo();
}
}
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