(Fix) Remove the provider when the site is disconnected (#1585)

This commit is contained in:
Fernando 2020-11-12 11:40:28 -03:00 committed by GitHub
parent 914333dc54
commit da1e39c2ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -4,7 +4,7 @@ import React from 'react'
import Button from 'src/components/layout/Button'
import { getNetworkId } from 'src/config'
import { getWeb3, setWeb3 } from 'src/logic/wallets/getWeb3'
import { fetchProvider } from 'src/logic/wallets/store/actions'
import { fetchProvider, removeProvider } from 'src/logic/wallets/store/actions'
import transactionDataCheck from 'src/logic/wallets/transactionDataCheck'
import { getSupportedWallets } from 'src/logic/wallets/utils/walletList'
import { store } from 'src/store'
@ -39,6 +39,7 @@ export const onboard = Onboard({
if (!address && lastUsedAddress) {
lastUsedAddress = ''
providerName = undefined
store.dispatch(removeProvider())
}
},
},