Skip to content

Commit

Permalink
Fix Brave browser off event listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
lubej committed Jan 11, 2024
1 parent 539801a commit 6fec739
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/providers/Web3Provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ export const Web3ContextProvider: FC<PropsWithChildren> = ({ children }) => {
}

const _removeEventListeners = (ethProvider = window.ethereum!) => {
ethProvider.off('accountsChanged', _accountsChanged)
ethProvider.off('chainChanged', _chainChanged)
ethProvider.off('connect', _connect)
ethProvider.off('disconnect', _disconnect)
ethProvider.off?.('accountsChanged', _accountsChanged)
ethProvider.off?.('chainChanged', _chainChanged)
ethProvider.off?.('connect', _connect)
ethProvider.off?.('disconnect', _disconnect)
}

const _init = async (account: string) => {
Expand Down

0 comments on commit 6fec739

Please sign in to comment.