fix refresh error (#429)

This commit is contained in:
Noah Zinsmeister 2019-08-27 01:02:25 +02:00 committed by GitHub
parent d18ee78ee7
commit 35d650e02b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -74,15 +74,11 @@ export function Updater() {
const [, { updateBlockNumber, updateUSDPrice }] = useApplicationContext()
// slow down polling interval
useEffect(() => {
if (library) {
if (connectorName === 'Network') {
library.polling = false
} else {
library.pollingInterval = 5
}
}
}, [library, connectorName])
if (library && connectorName === 'Network' && library.polling !== false) {
library.polling = false
} else if (library && library.pollingInterval !== 5) {
library.pollingInterval = 5
}
// update usd price
useEffect(() => {