From 47a27a0969d8363b423eb7a9b2589999d3476085 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Mon, 28 Jun 2021 13:54:22 +1000 Subject: [PATCH] Replace deprecated method --- examples/eth-dm/src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/eth-dm/src/App.tsx b/examples/eth-dm/src/App.tsx index 8bf74810f7..d35887e871 100644 --- a/examples/eth-dm/src/App.tsx +++ b/examples/eth-dm/src/App.tsx @@ -44,7 +44,7 @@ function App() { useEffect(() => { if (provider) return; try { - window.ethereum.enable(); + window.ethereum.request({ method: 'eth_requestAccounts' }); const _provider = new ethers.providers.Web3Provider(window.ethereum); setProvider(_provider); } catch (e) {