Skip to content

Commit

Permalink
Fix error handling issues - get Accounts - Issue compound-finance#65
Browse files Browse the repository at this point in the history
  • Loading branch information
0xzoz committed Mar 28, 2022
1 parent b1e2aa7 commit 9c6dab5
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/js/sharedEth/connectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,15 @@ async function connectWalletLink(eth, disallowAuthDialog = false) {
}

async function requiresAuthDialog(ethereum) {
let [account, _] = await new Eth(ethereum).getAccounts();

return !account;
try{
let [account, _] = await new Eth(ethereum).getAccounts();
return !account;

}catch(e){
console.log(e);
return false;

}
}

async function connectWeb3(eth, ethereum, disallowAuthDialog = false, isAutoConnect = false) {
Expand Down

0 comments on commit 9c6dab5

Please sign in to comment.