mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 18:00:18 +01:00
fix typo
This commit is contained in:
parent
7e64a578a4
commit
c10fb3ce3f
@ -48,19 +48,19 @@ class RecentBlocksController {
|
||||
log.error(err)
|
||||
}
|
||||
}
|
||||
let isListeng = false
|
||||
let isListening = false
|
||||
const { type } = networkController.getProviderConfig()
|
||||
if (!INFURA_PROVIDER_TYPES.includes(type) && type !== 'loading') {
|
||||
this.blockTracker.on('latest', blockListner)
|
||||
isListeng = true
|
||||
isListening = true
|
||||
}
|
||||
networkController.on('networkDidChange', (newType) => {
|
||||
if (INFURA_PROVIDER_TYPES.includes(newType) && isListeng) {
|
||||
if (INFURA_PROVIDER_TYPES.includes(newType) && isListening) {
|
||||
this.blockTracker.removeListener('latest', blockListner)
|
||||
} else if (
|
||||
!INFURA_PROVIDER_TYPES.includes(type) &&
|
||||
type !== 'loading' &&
|
||||
!isListeng
|
||||
!isListening
|
||||
) {
|
||||
this.blockTracker.on('latest', blockListner)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user