Replace deprecated method

This commit is contained in:
Franck Royer 2021-06-28 13:54:22 +10:00
parent 820307ef8c
commit 47a27a0969
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 1 additions and 1 deletions

View File

@ -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) {