enkryptcom / enKrypt

Enkrypt: Ethereum, Polkadot and Web3 Wallet
https://www.enkrypt.com/
MIT License
312 stars 159 forks source link

Calling the `eth_accounts` method prompts for wallet connection #431

Closed ardislu closed 5 months ago

ardislu commented 5 months ago

Steps to reproduce the issue: Host this HTML file on a local web server and open it in a web browser where the Enkrypt wallet is installed:

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>eth_accounts test</title>
</head>

<body>
  <script>
    const wallets = [];
    window.addEventListener('eip6963:announceProvider', e => wallets.push(e.detail));
    window.dispatchEvent(new Event('eip6963:requestProvider'));

    for (const wallet of wallets) {
      wallet.provider.request({ method: 'eth_accounts' }).then(console.log);
    }
  </script>
</body>

</html>

Expected result: no wallet connection prompt is shown to the user and an empty array ([]) is logged to console.

Actual result: a wallet connection prompt is shown to the user.


This behavior is not consistent with other wallets. I tested with:

Enkrypt is the only wallet which prompts for wallet connection for the eth_accounts method. All other wallets do not prompt for wallet connection and log [] as expected.

krud491 commented 5 months ago

<!DOCTYPE html> and are used to indicate the document's type and language:

kvhnuke commented 5 months ago

fixed here https://github.com/enkryptcom/enKrypt/pull/432/commits/0bfd4ce15ca72a9c09a785c4cac9bf7719d2abb9

should be live on next version

Dushman-hab commented 1 month ago

šŸ¤–

Dushman-hab commented 1 month ago

šŸ¤©

Dushman-hab commented 1 month ago

,šŸ¤–

Dushman-hab commented 1 month ago

šŸ¤©

Dushman-hab commented 1 month ago

šŸ¤–

Dushman-hab commented 1 month ago

šŸ¤©

Dushman-hab commented 1 month ago

šŸ¤–

Dushman-hab commented 1 month ago

šŸ¤©

Dushman-hab commented 1 month ago

šŸ¤–

Dushman-hab commented 1 month ago

šŸ¤©

Dushman-hab commented 1 month ago

šŸ¤–

Dushman-hab commented 1 month ago

šŸ¤©

Dushman-hab commented 1 month ago

šŸ¤–