diff --git a/src/stores/ForeignStore.js b/src/stores/ForeignStore.js index 57de6ae4..79038730 100644 --- a/src/stores/ForeignStore.js +++ b/src/stores/ForeignStore.js @@ -64,7 +64,7 @@ class ForeignStore { this.getEvents() this.getTokenBalance() this.getCurrentLimit() - }, 5000) + }, 15000) } @action diff --git a/src/stores/HomeStore.js b/src/stores/HomeStore.js index 21f3d811..7cb14174 100644 --- a/src/stores/HomeStore.js +++ b/src/stores/HomeStore.js @@ -57,9 +57,11 @@ class HomeStore { setInterval(() => { this.getEvents() this.getBalance() - this.getCurrentLimit() this.getBlockNumber() }, 5000) + setInterval(() => { + this.getCurrentLimit() + }, 10000) } @action diff --git a/src/stores/Web3Store.js b/src/stores/Web3Store.js index 22dca1e3..2b6f66f4 100644 --- a/src/stores/Web3Store.js +++ b/src/stores/Web3Store.js @@ -5,7 +5,7 @@ import swal from 'sweetalert' class Web3Store { @observable injectedWeb3 = {}; - @observable defaultAccount = {address: '', homeBalance: '', foreignBalance: ''}; + @observable defaultAccount = {address: '', homeBalance: ''}; @observable homeWeb3 = {}; @observable foreignWeb3 = {}; @@ -32,7 +32,7 @@ class Web3Store { this.getBalances(false) setInterval(() => { this.getBalances(true) - }, 1000) + }, 3000) }).catch((e) => { console.error(e,'web3 not loaded') this.errors.push(e.message) @@ -79,7 +79,6 @@ class Web3Store { this.defaultAccount.address = accounts[0] } this.defaultAccount.homeBalance = await getBalance(this.homeWeb3, this.defaultAccount.address) - this.defaultAccount.foreignBalance = await getBalance(this.foreignWeb3, this.defaultAccount.address) if(accountUpdated) { await this.rootStore.foreignStore.getTokenBalance() this.alertStore.setLoading(false)