diff --git a/app/components/candidates/List.vue b/app/components/candidates/List.vue index 05f7c436..25331678 100644 --- a/app/components/candidates/List.vue +++ b/app/components/candidates/List.vue @@ -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) { @@ -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): diff --git a/app/components/candidates/View.vue b/app/components/candidates/View.vue index 07d725dd..67bf488e 100644 --- a/app/components/candidates/View.vue +++ b/app/components/candidates/View.vue @@ -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) { @@ -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) { diff --git a/package.json b/package.json index b1d35560..174f43c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tomomaster", - "version": "1.1.0", + "version": "1.1.1", "description": "TomoChain Governance DApp", "main": "elect.js", "scripts": {