Skip to content

Commit

Permalink
Logging accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
hide-on-bush-x committed Feb 15, 2023
1 parent 1fceb55 commit baaa4a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/provider/use-metamask.ts
Expand Up @@ -52,7 +52,6 @@ export const useMetamask = ({
useEffect(() => {
const connectWalletOnPageLoad = async (): Promise<void> => {
if (localStorage?.getItem('isWalletConnected') === 'true') {
console.log('CALLING RECONNECT');
try {
await connect();
} catch (ex) {
Expand All @@ -78,6 +77,7 @@ export const useMetamask = ({
window?.ethereum?.on(
'accountsChanged',
async (accounts: unknown): Promise<void> => {
console.log('USE METAMASK', { accounts });
if (accounts instanceof Array && accounts.length === 0) {
setProvider?.(null);
await handleLogout?.();
Expand Down

0 comments on commit baaa4a7

Please sign in to comment.