Skip to content

Commit

Permalink
Checking if window object exists [ Next.JS fix ]
Browse files Browse the repository at this point in the history
  • Loading branch information
hide-on-bush-x committed Nov 30, 2022
1 parent 795fcf2 commit cbd0b54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/helpers/provider/use-metamask.ts
Expand Up @@ -22,7 +22,7 @@ export const useMetamask = () => {

const connect = useCallback(async () => {
//@ts-ignore
if (typeof window !== "undefined" && window?.ethereum) {
if (typeof window !== 'undefined' && window?.ethereum) {
await provider.send('eth_requestAccounts', []);

await accountChangedHandler(provider.getSigner(0));
Expand Down

0 comments on commit cbd0b54

Please sign in to comment.