diff --git a/app/app.js b/app/app.js index 09215830..f8cf7b53 100644 --- a/app/app.js +++ b/app/app.js @@ -79,7 +79,7 @@ Vue.prototype.setupProvider = async function (provider, wjs) { Vue.prototype.NetworkProvider = provider if (wjs instanceof Web3) { const config = await getConfig() - localStorage.set('config', config) + localStorage.set('configMaster', config) Vue.prototype.web3 = wjs Vue.prototype.TomoValidator = new wjs.eth.Contract( TomoValidatorArtifacts.abi, @@ -381,7 +381,7 @@ getConfig().then((config) => { // let provider = 'tomowallet' // var web3js = new Web3(new Web3.providers.HttpProvider(config.blockchain.rpc)) // Vue.prototype.setupProvider(provider, web3js) - localStorage.set('config', config) + localStorage.set('configMaster', config) Vue.use(VueAnalytics, { id: config.GA, linkers: ['tomochain.com'], @@ -405,7 +405,7 @@ const store = new Vuex.Store({ Vue.prototype.detectNetwork = async function (provider) { try { let wjs = this.web3 - const config = localStorage.get('config') || await getConfig() + const config = localStorage.get('configMaster') || await getConfig() const chainConfig = config.blockchain if (!wjs) { switch (provider) { @@ -462,7 +462,7 @@ Vue.prototype.signTransaction = async function (txParams) { const provider = Vue.prototype.NetworkProvider let signature if (provider === 'ledger') { - const config = localStorage.get('config') || await getConfig() + const config = localStorage.get('configMaster') || await getConfig() const chainConfig = config.blockchain const rawTx = new Transaction(txParams) rawTx.v = Buffer.from([chainConfig.networkId]) diff --git a/app/components/Setting.vue b/app/components/Setting.vue index 85373953..ddc6260b 100644 --- a/app/components/Setting.vue +++ b/app/components/Setting.vue @@ -436,7 +436,7 @@ export default { this.provider = this.NetworkProvider || 'tomowallet' let self = this self.hdWallets = self.hdWallets || {} - self.config = store.get('config') || await self.appConfig() + self.config = store.get('configMaster') || await self.appConfig() self.chainConfig = self.config.blockchain || {} self.networks.rpc = self.chainConfig.rpc diff --git a/app/components/candidates/Apply.vue b/app/components/candidates/Apply.vue index 71a2bd79..bb690dcf 100644 --- a/app/components/candidates/Apply.vue +++ b/app/components/candidates/Apply.vue @@ -197,7 +197,7 @@ export default { created: async function () { const self = this let account - self.config = store.get('config') || await self.appConfig() + self.config = store.get('configMaster') || await self.appConfig() self.chainConfig = self.config.blockchain || {} try { self.isReady = !!self.web3 diff --git a/app/components/candidates/List.vue b/app/components/candidates/List.vue index 8c595d90..8a2067a7 100644 --- a/app/components/candidates/List.vue +++ b/app/components/candidates/List.vue @@ -221,7 +221,7 @@ export default { let self = this let account self.isReady = !!self.web3 - const config = store.get('config') || await self.appConfig() + const config = store.get('configMaster') || await self.appConfig() self.chainConfig = config.blockchain self.currentBlock = self.chainConfig.blockNumber diff --git a/app/components/candidates/Resign.vue b/app/components/candidates/Resign.vue index 916336af..8b92a9af 100644 --- a/app/components/candidates/Resign.vue +++ b/app/components/candidates/Resign.vue @@ -103,7 +103,7 @@ export default { created: async function () { let self = this let account - self.config = store.get('config') || await self.appConfig() + self.config = store.get('configMaster') || await self.appConfig() self.chainConfig = self.config.blockchain || {} self.isReady = !!self.web3 self.gasPrice = await self.web3.eth.getGasPrice() diff --git a/app/components/candidates/View.vue b/app/components/candidates/View.vue index ec0c0509..1e259a76 100644 --- a/app/components/candidates/View.vue +++ b/app/components/candidates/View.vue @@ -630,7 +630,7 @@ export default { }, created: async function () { let self = this - self.config = store.get('config') || await this.appConfig() + self.config = store.get('configMaster') || await this.appConfig() self.currentBlock = self.config.blockchain.blockNumber self.isReady = !!self.web3 try { diff --git a/app/components/candidates/Withdraw.vue b/app/components/candidates/Withdraw.vue index 555de621..8d6da994 100644 --- a/app/components/candidates/Withdraw.vue +++ b/app/components/candidates/Withdraw.vue @@ -143,7 +143,7 @@ export default { }, async mounted () { const self = this - self.config = store.get('config') || await self.appConfig() + self.config = store.get('configMaster') || await self.appConfig() self.chainConfig = self.config.blockchain || {} self.isReady = !!this.web3 if (!self.coinbase) { diff --git a/app/components/voters/Confirm.vue b/app/components/voters/Confirm.vue index 3c689725..0e80ffb0 100644 --- a/app/components/voters/Confirm.vue +++ b/app/components/voters/Confirm.vue @@ -62,7 +62,7 @@ export default { updated () {}, created: async function () { let self = this - self.config = store.get('config') || await self.appConfig() + self.config = store.get('configMaster') || await self.appConfig() axios.get(`/api/transactions/${self.tx}`).then(function (response) { if (response.data == null) { diff --git a/app/components/voters/Unvoting.vue b/app/components/voters/Unvoting.vue index 82da852a..fc333237 100644 --- a/app/components/voters/Unvoting.vue +++ b/app/components/voters/Unvoting.vue @@ -262,7 +262,7 @@ export default { let candidate = self.candidate let account self.loadingPage = true - self.config = store.get('config') || await self.appConfig() + self.config = store.get('configMaster') || await self.appConfig() self.chainConfig = self.config.blockchain || {} self.gasPrice = await self.web3.eth.getGasPrice() self.txFee = new BigNumber(this.chainConfig.gas * self.gasPrice).div(10 ** 18).toString(10) diff --git a/app/components/voters/View.vue b/app/components/voters/View.vue index ef474387..0653b055 100644 --- a/app/components/voters/View.vue +++ b/app/components/voters/View.vue @@ -418,7 +418,7 @@ export default { update () {}, created: async function () { let self = this - self.config = store.get('config') || await self.appConfig() + self.config = store.get('configMaster') || await self.appConfig() self.getCandidates() self.getRewards() diff --git a/app/components/voters/Voting.vue b/app/components/voters/Voting.vue index 3c2d53cc..2dfd1f0b 100644 --- a/app/components/voters/Voting.vue +++ b/app/components/voters/Voting.vue @@ -220,7 +220,7 @@ export default { created: async function () { let self = this let account - self.config = store.get('config') || await self.appConfig() + self.config = store.get('configMaster') || await self.appConfig() self.chainConfig = self.config.blockchain || {} self.isReady = !!self.web3 self.gasPrice = await self.web3.eth.getGasPrice()