mirror of https://github.com/status-im/js-waku.git
Replace deprecated method
This commit is contained in:
parent
820307ef8c
commit
47a27a0969
|
@ -44,7 +44,7 @@ function App() {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (provider) return;
|
if (provider) return;
|
||||||
try {
|
try {
|
||||||
window.ethereum.enable();
|
window.ethereum.request({ method: 'eth_requestAccounts' });
|
||||||
const _provider = new ethers.providers.Web3Provider(window.ethereum);
|
const _provider = new ethers.providers.Web3Provider(window.ethereum);
|
||||||
setProvider(_provider);
|
setProvider(_provider);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
Loading…
Reference in New Issue