Skip to content

Commit

Permalink
Merge pull request #264 from thanhson1085/master
Browse files Browse the repository at this point in the history
simplify tomomaster, blockSigner
  • Loading branch information
thanhson1085 committed Oct 30, 2018
2 parents 819397b + 9b0c2bb commit 331efab
Show file tree
Hide file tree
Showing 13 changed files with 80 additions and 644 deletions.
22 changes: 0 additions & 22 deletions apis/blocksigners.js

This file was deleted.

8 changes: 0 additions & 8 deletions apis/candidates.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ router.get('/', async function (req, res, next) {
}

let map = candidates.map(async c => {
let bs = await db.BlockSigner.findOne({
'signers.signer': c.candidate
}).sort({ _id: 'desc' })
c.latestSignedBlock = (bs || {}).blockNumber || 0

// is masternode
c.isMasternode = set.has(c.candidate)
return c
Expand All @@ -55,9 +50,6 @@ router.get('/:candidate', async function (req, res, next) {
candidate: address
}) || {})

candidate.totalSignedBlocks = await db.BlockSigner.countDocuments({
'signers.signer': address
})
return res.json(candidate)
})

Expand Down
4 changes: 0 additions & 4 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import CandidateList from './components/candidates/List.vue'
import CandidateApply from './components/candidates/Apply.vue'
import CandidateResign from './components/candidates/Resign.vue'
import CandidateWithdraw from './components/candidates/Withdraw.vue'
import BlockSigner from './components/blocksigners/List.vue'
import VoterView from './components/voters/View'
import VotingView from './components/voters/Voting'
import UnvotingView from './components/voters/Unvoting'
Expand Down Expand Up @@ -182,9 +181,6 @@ const router = new VueRouter({
{
path: '/confirm/:transaction', component: ConfirmView
},
{
path: '/blocksigners', component: BlockSigner
},
{
path: '/setting', component: Setting
}
Expand Down
115 changes: 0 additions & 115 deletions app/components/blocksigners/List.vue

This file was deleted.

2 changes: 1 addition & 1 deletion app/components/candidates/List.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@

<template
slot="cap"
slot-scope="data">{{ formatCurrencySymbol(formatNumber(data.item.cap)) }}
slot-scope="data">{{ formatCurrencySymbol(formatBigNumber(data.item.cap, 2)) }}
</template>

<template
Expand Down
Loading

0 comments on commit 331efab

Please sign in to comment.