Skip to content

Commit

Permalink
Merge pull request #9 from casper-network/fix/launch-cleanup
Browse files Browse the repository at this point in the history
fix: suspended -> revoked label.
  • Loading branch information
ledgerleapllc authored Aug 23, 2023
2 parents dcd1f9b + 964e35f commit 8786158
Show file tree
Hide file tree
Showing 3 changed files with 389 additions and 84 deletions.
32 changes: 27 additions & 5 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -693,25 +693,47 @@ export default {
this.catch401(response);
if (response.status == 200) {
console.log(response.detail);
console.log(this.settings);
this.getMe();
this.sus_loading = false;
this.stats_uptime = response.detail.uptime ?? 0;
this.stats_redmarks = response.detail.redmarks ?? 0;
this.sus_loading = false;
this.stats_uptime = parseFloat(response.detail?.uptime);
this.stats_redmarks = parseInt(response.detail?.redmarks);
if (this.stats_uptime < this.settings.uptime_probation) {
this.sus_stat = 'Your uptime is still too low to be re-instated';
this.toast(
'',
this.sus_stat,
'info'
);
return;
}
if (this.stats_redmarks > this.settings.redmark_revoke) {
if (this.stats_redmarks >= this.settings.redmark_revoke) {
this.sus_stat = 'Your node has too many redmarks to be re-instated';
this.toast(
'',
this.sus_stat,
'info'
);
return;
}
if (
this.stats_uptime >= this.settings.uptime_probation &&
this.stats_redmarks < this.settings.redmark_revoke
) {
this.sus_stat = 'You can request reactivation!';
this.toast(
'',
this.sus_stat,
'success'
);
return;
}
} else {
this.toast(
Expand Down
Loading

0 comments on commit 8786158

Please sign in to comment.