Skip to content

Commit

Permalink
enable 3085 requests for coinbase wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanww committed Nov 8, 2021
1 parent ab93d51 commit 8142188
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/state/application/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,13 @@ export default function Updater(): null {
}, [dispatch, debouncedState.chainId])

useEffect(() => {
if (!account || !library?.provider?.request || !library?.provider?.isMetaMask) {
// @ts-ignore
const isCbWalletDappBrowser = window?.ethereum?.isCoinbaseWallet
// @ts-ignore
const isWalletlink = !!window?.WalletLinkProvider || !!window?.walletLinkExtension
const isCbWallet = isCbWalletDappBrowser || isWalletlink
const isMetamaskOrCbWallet = library?.provider?.isMetaMask || isCbWallet
if (!account || !library?.provider?.request || !isMetamaskOrCbWallet) {
return
}
switchToNetwork({ library })
Expand Down

0 comments on commit 8142188

Please sign in to comment.