diff --git a/src/wallet.ts b/src/wallet.ts index aaae0bc7..39d9f331 100644 --- a/src/wallet.ts +++ b/src/wallet.ts @@ -22,12 +22,7 @@ export interface TypedMessageParams extends MessageParams { } export interface WalletMiddlewareOptions { - getAccounts: ( - req: JsonRpcRequest, - options?: { - suppressUnauthorized?: boolean; - }, - ) => Promise; + getAccounts: (req: JsonRpcRequest) => Promise; processDecryptMessage?: ( msgParams: MessageParams, req: JsonRpcRequest, @@ -383,12 +378,9 @@ export function createWalletMiddleware({ address.length > 0 && resemblesAddress(address) ) { - // ensure address is included in provided accounts. `suppressUnauthorized: false` is passed to `getAccounts` - // so that an "unauthorized" error is thrown if the requester does not have the `eth_accounts` + // Ensure that an "unauthorized" error is thrown if the requester does not have the `eth_accounts` // permission. - const accounts: string[] = await getAccounts(req, { - suppressUnauthorized: false, - }); + const accounts = await getAccounts(req); const normalizedAccounts: string[] = accounts.map((_address) => _address.toLowerCase(), );