We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8ca7d0 commit 12d56f9Copy full SHA for 12d56f9
packages/rln/src/utils/rpcClient.ts
@@ -27,7 +27,11 @@ export const createViemClientFromWindow = async (): Promise<RpcClient> => {
27
);
28
}
29
30
- const [account] = await ethereum.request({ method: "eth_requestAccounts" });
+ const accounts = await ethereum.request({ method: "eth_requestAccounts" });
31
+ if (!Array.isArray(accounts)) {
32
+ throw Error("Failed to get accounts");
33
+ }
34
+ const account = accounts[0] as Address;
35
36
const rpcClient: RpcClient = createWalletClient({
37
account: account as Address,
0 commit comments