adrianhajdin / project_web3_battle_game

With a stunning design, interactive gameplay, smart wallet pairing, live interaction with smart contracts, and, most importantly, the ability to battle other players in real-time, AvaxGods is the best and the only Web3 battle-style online multiplayer card game that you can currently find on YouTube.
https://jsmastery.pro
435 stars 144 forks source link

Metamask RPC error resource unavailable #5

Open David15111 opened 1 year ago

David15111 commented 1 year ago

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

NLBGoncalves commented 1 year ago

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]);

};

salaimuniselvam-s commented 1 year ago

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 ..