DeltaPrimeLabs / deltaprime-primeloans

Other
24 stars 13 forks source link

"You have no wallet installed. Please download and activate Rabby or Metamask" even if the wallet is installed #298

Open melonges opened 2 months ago

melonges commented 2 months ago

Description

I have encountered an intermittent issue where Dapp incorrectly displays a warning banner stating that the user's crypto wallets are not installed, even though they are. This appears to be due to the Dapp checking for the existence of window.ethereum before the wallet extension has had sufficient time to inject the ethereum object into the window.

Expected Behavior

Should be no banner

Actual Behavior

The Dapp intermittently displays a warning banner about wallets not being installed due to premature checking for window.ethereum, even when a crypto wallet like MetaMask or Rabby is installed.

Possible Solution

Сhecking window.ethereum with a delay

Additional Information

image

melonges commented 2 months ago

@mbare0