web3modal icon indicating copy to clipboard operation
web3modal copied to clipboard

WEB3MODAL BREAKS DAPP WHEN USER REFUSES TO CONNECT WALLET

Open Dayo-Adewuyi opened this issue 2 years ago • 1 comments

image

As seen in the attached screenshot, if a user rejects the option of connecting their wallet after the pop-up, the attached error is returned on the webpage.

how can i fix it

Dayo-Adewuyi avatar Jun 25 '22 00:06 Dayo-Adewuyi

@Dayo-Adewuyi Wrap your code in a try...catch and if an error occurs, handle it in a catch block.

VitaliyShulik avatar Jun 25 '22 05:06 VitaliyShulik

A try-catch block would certainly solve this issue. Appreciate your help @VitaliyShulik , closing this issue. Check out W3MV2 if you haven't :)

hackyguru avatar Sep 19 '22 13:09 hackyguru