Skip to content

Commit

Permalink
Added unauthorized error when account is provided but is not returned…
Browse files Browse the repository at this point in the history
… from getAccounts
  • Loading branch information
shanejonas committed Mar 23, 2022
1 parent daa9b2f commit 35e6616
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ export function createWalletMiddleware({
if (normalizedAccounts.includes(normalizedAddress)) {
return normalizedAddress;
}
throw ethErrors.provider.unauthorized();
}
throw ethErrors.rpc.invalidParams({
message: `Invalid parameters: must provide an Ethereum address.`,
Expand Down

0 comments on commit 35e6616

Please sign in to comment.