Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
feat: close vote modal after sending and show missed blocks in delega…
Browse files Browse the repository at this point in the history
…te info modal (#386)
  • Loading branch information
ItsANameToo committed Oct 14, 2018
1 parent 74fc3d7 commit 7ab8f99
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/>
<ListDividedItem
:label="$t('WALLET_DELEGATES.BLOCKS')"
:value="delegate.blocks.produced"
:value="blocksProduced()"
/>
<ListDividedItem
v-if="delegate.votes"
Expand Down Expand Up @@ -163,6 +163,16 @@ export default {
this.isPassphraseStep = !this.isPassphraseStep
},
blocksProduced () {
const blocks = this.delegate.blocks.produced
const missed = this.delegate.blocks.missed
if (missed > 0) {
return `${blocks} (${missed} ${this.$t('WALLET_DELEGATES.MISSED')})`
}
return blocks
},
async fetchForged () {
const forged = await this.$client.fetchDelegateForged(this.delegate)
this.forged = this.currency_format(this.currency_subToUnit(forged), { currencyFrom: 'network' })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export default {
onSent () {
this.votePublicKey = null
this.selected = null
},
onCancel () {
Expand Down
1 change: 1 addition & 0 deletions src/renderer/i18n/locales/en-US.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ export default {
APPROVAL: 'Approval',
FORGED: 'Forged',
BLOCKS: 'Blocks',
MISSED: 'missed',
VOTERS: 'Voters',
UNVOTE: 'Unvote',
VOTES: 'Votes',
Expand Down

0 comments on commit 7ab8f99

Please sign in to comment.