zilpay / zil-pay

ZilPay browser extension enables browsing Zilliqa blockchain enabled websites.
https://zilpay.io
Other
3 stars 1 forks source link

When a dapp is connected - wallet.connect() doesn't ask the user to unlock their wallet #27

Closed VexyCats closed 4 years ago

VexyCats commented 4 years ago

If a wallet is locked - and the user has already connected to the site - then no function called will ask them to unlock their wallet

If the user is NOT connected to the dapp - calling wallet.connect() will ask them to unlock and then let the dapp access their wallet.

If the user IS connected to the dapp but comes back the next day - nothing can be called to show the wallet unlock screen - so if the dapp requires a wallet unlocked, it will just ask them to unlock it.

.connect() should show "unlock your wallet" even if they are connected already.

Otherwise there needs to be another function to call when wallet.isEnabled() returns false

hicaru commented 4 years ago

Thanks for your issue, i can decide this two variants:

  1. Show popup for unlock and confirm or reject connection to website.
  2. Throw an error "Wallet has disabled.".
VexyCats commented 4 years ago

An error is already thrown when trying to access their wallet but its locked. So thats not helpful as its already happening.

There needs to be a way to prompt the user to unlock their wallet to continue. We can currently show a modal that says unlock your wallet, but then they need to refresh the page once unlocked.

Number 1 is the best choice.

hicaru commented 4 years ago

ok, then it will be popup