From a61d8a8629da360ceb79f621cdbf475875867145 Mon Sep 17 00:00:00 2001 From: Vladislav Kokosh Date: Wed, 29 May 2024 14:47:33 +0300 Subject: [PATCH] Update ethereum.send to ethereum.request --- src/utils/providers/metamask/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/providers/metamask/index.ts b/src/utils/providers/metamask/index.ts index 06563ad..c21663e 100644 --- a/src/utils/providers/metamask/index.ts +++ b/src/utils/providers/metamask/index.ts @@ -47,8 +47,10 @@ export class Metamask implements Provider { ], }); - const accounts = (await window.ethereum.send("eth_requestAccounts")) - .result; + const accounts = await window.ethereum.request({ + "method": "eth_requestAccounts", + "params": [] + }); this.myAddress = accounts[0]; } catch (e: any) {