Is there a way with web3 js to make the wallet popup window close if after certain length of time the user has not confirmed for the transaction.
basically I need to lock the sale item to be purchased since it's a unique item and the smart contract has no knowledge of this item has already been sold or not, but if the metamask wallet popup for a long time but the user does not click on confirm button or the browser or computer crashed, we don't want to lock the item for too long.
but if we release the lock in our system to allow other people to purchase it, the first buyer can still click on confirm button in wallet after waiting for a long time, then this unique item will be sold twice.
Is there any method to implement lock on the item and avoid the hung wallet ?