project_web3_battle_game icon indicating copy to clipboard operation
project_web3_battle_game copied to clipboard

Metamask RPC error resource unavailable

Open David15111 opened this issue 2 years ago • 2 comments

uncaught ( in promise ) code 32002 index.jsx :21

i tried 7-8 time in last 10 days and getting stucked due to them aftr exactly 1 hour of video i mean i type test but it continue sho0w me isplayer is not a function tried almost everything AFDF1087-1A4A-4A97-A430-AB8004919634_1_105_c

David15111 avatar Nov 14 '22 11:11 David15111

Hi! will change the "eth_requestAccounts" to "eth_accounts". And it will look like this:

const updateCurrentWalletAddress = async () => { const accounts = await window?.ethereum?.request({ method: 'eth_accounts' });

    if(accounts) setWalletAddress(accounts[0]);

};

NLBGoncalves avatar Nov 21 '22 23:11 NLBGoncalves

Hi! will change the "eth_requestAccounts" to "eth_accounts". And it will look like this:

const updateCurrentWalletAddress = async () => { const accounts = await window?.ethereum?.request({ method: 'eth_accounts' });

    if(accounts) setWalletAddress(accounts[0]);

};

Thanks it fixed my issue ..

salaimuniselvam-s avatar Nov 26 '22 09:11 salaimuniselvam-s