Skip to content

Commit

Permalink
Replace ethereum.off with ethereum.removeListener (MetaMask#504)
Browse files Browse the repository at this point in the history
Co-authored-by: Austin Akers <[email protected]>
  • Loading branch information
Nahee-Park and BboyAkers authored Jul 4, 2022
1 parent 35c79a9 commit 06dfcfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/guide/onboarding-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export function OnboardingButton() {
.then(handleNewAccounts);
window.ethereum.on('accountsChanged', handleNewAccounts);
return () => {
window.ethereum.off('accountsChanged', handleNewAccounts);
window.ethereum.removeListener('accountsChanged', handleNewAccounts);
};
}
}, []);
Expand Down

0 comments on commit 06dfcfd

Please sign in to comment.