Skip to content

Commit

Permalink
reduce validator stats bugs (#1281)
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoPlays authored Jun 14, 2023
1 parent f0da873 commit 6afae0d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
9 changes: 8 additions & 1 deletion launcher/src/components/UI/the-staking/StateDropdown.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="dropDown_parent">
<div class="dropDown_box">
<div class="dropDown" @click="toggleDropDown">
<div class="dropDown" :class="{ disabled: currentNetwork.network === 'gnosis' }" @click="toggleDropDown">
<div v-if="!selectedValidator.key" class="options">Choose a validator</div>
<div v-else class="options">
{{ selectedValidator.key }}
Expand All @@ -21,6 +21,8 @@
</template>

<script>
import { mapWritableState } from "pinia";
import { useNodeManage } from "../../../store/nodeManage";
export default {
props: {
keys: {
Expand All @@ -34,6 +36,11 @@ export default {
selectedValidator: {},
};
},
computed: {
...mapWritableState(useNodeManage, {
currentNetwork: "currentNetwork",
}),
},
methods: {
toggleDropDown() {
this.dropDownIsOpen = !this.dropDownIsOpen;
Expand Down
2 changes: 1 addition & 1 deletion launcher/src/components/UI/the-staking/TheAttestation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default {
} else if (this.stats.ETA === " ETA: now!") {
return "";
} else {
return `${this.stats.remainingTime} sec`;
return `${this.stats.remainingTime ? this.stats.remainingTime : '-'} sec`;
}
},
},
Expand Down
4 changes: 2 additions & 2 deletions launcher/src/components/UI/the-staking/TotalBalance.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
<span class="epochNumber">{{ stats.currentEpoch }}</span>
</div>
<div class="slotBox">
<span class="firstNumber">{{ stats.idx }}#</span>
<span class="firstNumber">{{ stats.currentSlot ? ((stats.currentSlot % 32) +1 ) : 0}}#</span>
<span class="outOf">/</span>
<span class="secondNumber">32#</span>
<span class="divider"></span>
<span class="slotNumber">{{ stats.attestationSlot }}</span>
<span class="slotNumber">{{ stats.currentSlot }}</span>
</div>
</div>
</div>
Expand Down

0 comments on commit 6afae0d

Please sign in to comment.