Skip to content

Commit

Permalink
fix issue alot config api called
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhson1085 committed Dec 25, 2018
1 parent a5c4f66 commit 5f59e61
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions app/components/candidates/List.vue
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ export default {
let self = this
let account
self.isReady = !!self.web3
let config = await self.appConfig()
self.chainConfig = config.blockchain
try {
if (self.isReady) {
Expand Down Expand Up @@ -284,9 +286,8 @@ export default {
})
}
},
async getColor (latestSignedBlock) {
let config = await this.appConfig()
const currentBlock = config.blockchain.blockNumber
getColor (latestSignedBlock) {
const currentBlock = this.chainConfig.blockNumber
let result
switch (true) {
case latestSignedBlock >= (currentBlock - 20):
Expand Down
6 changes: 3 additions & 3 deletions app/components/candidates/View.vue
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ export default {
},
created: async function () {
let self = this
self.config = await this.appConfig()
self.isReady = !!self.web3
try {
if (self.isReady) {
Expand Down Expand Up @@ -685,9 +686,8 @@ export default {
console.log(e)
}
},
async getColor (latestSignedBlock) {
const config = await this.appConfig()
const currentBlock = config.blockchain.blockNumber
getColor (latestSignedBlock) {
const currentBlock = this.config.blockchain.blockNumber
let result
switch (true) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tomomaster",
"version": "1.1.0",
"version": "1.1.1",
"description": "TomoChain Governance DApp",
"main": "elect.js",
"scripts": {
Expand Down

0 comments on commit 5f59e61

Please sign in to comment.