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() const [, { updateBlockNumber, updateUSDPrice }] = useApplicationContext()
// slow down polling interval // slow down polling interval
useEffect(() => { if (library && connectorName === 'Network' && library.polling !== false) {
if (library) { library.polling = false
if (connectorName === 'Network') { } else if (library && library.pollingInterval !== 5) {
library.polling = false library.pollingInterval = 5
} else { }
library.pollingInterval = 5
}
}
}, [library, connectorName])
// update usd price // update usd price
useEffect(() => { useEffect(() => {