Skip to content

Instantly share code, notes, and snippets.

@MCarlomagno
Created April 14, 2022 00:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MCarlomagno/312261d69a1b9cc0f878211fa13f16a3 to your computer and use it in GitHub Desktop.
Save MCarlomagno/312261d69a1b9cc0f878211fa13f16a3 to your computer and use it in GitHub Desktop.
async fetchAccounts() {
if(typeof window === "undefined") return;
return window
.ethereum?.request({ method: "eth_accounts" })
.catch((err: any) => console.log(err));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment