Commit 8163aaca authored by Pieterjan Vanhoof's avatar Pieterjan Vanhoof Committed by GitHub

Merge pull request #224 from stratisproject/ui

Remove package-lock and add blank pop up workaround
parents a8af8ff5 af74d078
......@@ -248,6 +248,7 @@ ModelManifest.xml
# dependencies
**/node_modules
package-lock.json
# IDEs and editors
/.idea
......
This diff is collapsed.
......@@ -28,13 +28,11 @@ export class DashboardComponent implements OnInit {
private walletHistorySubscription: Subscription;
ngOnInit() {
this.getWalletBalance();
this.getHistory();
this.startSubscriptions();
};
ngOnDestroy() {
this.walletBalanceSubscription.unsubscribe();
this.walletHistorySubscription.unsubscribe();
this.cancelSubscriptions();
};
private openSendDialog() {
......@@ -70,7 +68,12 @@ export class DashboardComponent implements OnInit {
console.log(error);
}
else {
if (error.json().errors[0].description) {
alert(error.json().errors[0].description);
} else {
this.cancelSubscriptions();
this.startSubscriptions();
}
}
}
}
......@@ -98,11 +101,31 @@ export class DashboardComponent implements OnInit {
console.log(error);
}
else {
if (error.json().errors[0].description) {
alert(error.json().errors[0].description);
} else {
this.cancelSubscriptions();
this.startSubscriptions();
}
}
}
}
)
;
};
private cancelSubscriptions() {
if (this.walletBalanceSubscription) {
this.walletBalanceSubscription.unsubscribe();
}
if(this.walletHistorySubscription) {
this.walletHistorySubscription.unsubscribe();
}
};
private startSubscriptions() {
this.getWalletBalance();
this.getHistory();
}
}
......@@ -25,11 +25,11 @@ export class HistoryComponent {
private walletHistorySubscription: Subscription;
ngOnInit() {
this.getHistory();
this.startSubscriptions();
}
ngOnDestroy() {
this.walletHistorySubscription.unsubscribe();
this.cancelSubscriptions();
}
private openTransactionDetailDialog(transaction: any) {
......@@ -57,11 +57,26 @@ export class HistoryComponent {
console.log(error);
}
else {
if (error.json().errors[0].description) {
alert(error.json().errors[0].description);
} else {
this.cancelSubscriptions();
this.startSubscriptions();
}
}
}
}
)
;
};
private cancelSubscriptions() {
if(this.walletHistorySubscription) {
this.walletHistorySubscription.unsubscribe();
}
};
private startSubscriptions() {
this.getHistory();
}
}
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