Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a function revokeAccess that disconnects any previously connected wallets #7037

Open
AnumQ opened this issue May 9, 2024 · 4 comments
Labels
4.x 4.0 related Enhancement Includes improvements or optimizations

Comments

@AnumQ
Copy link

AnumQ commented May 9, 2024

Create function named revokeAccess to disconnect previously connected wallet

Create a function revokeAccess that implements the following RPC call in order to disconnect any previously connected accounts:

await window.ethereum.request({
    method: "wallet_revokePermissions",
    params: [
      {
        eth_accounts: {},
      },
    ],
  });

See more details here

@SantiagoDevRel
Copy link
Member

good point @AnumQ !
@mconnelly8 she is one of the web3.js ambassadors :)

@SantiagoDevRel SantiagoDevRel added 4.x 4.0 related Enhancement Includes improvements or optimizations labels May 10, 2024
@jdevcs
Copy link
Contributor

jdevcs commented May 28, 2024

We discussed this in team meeting, and agreed on : instead of supporting wallet_revokePermissions only, we should add support of list of common wallet rpc functions like: wallet_addEthereumChain , wallet_switchEthereumChain, wallet_getPermissions, wallet_requestPermissions, wallet_revokePermissions, ..etc so scope of above task is :

  • create list of RPC functions supported by major 3 wallets
  • add these either in web3 core lib or create a plugin for generic wallet supported RPCs ( functionality, documentation, unit and e2e testing )

@AnumQ
Copy link
Author

AnumQ commented May 28, 2024

Thanks for the feedback @jdevcs! Do you already have somebody on the task? If not, I can look into implementation of the additional RPC functions once I am done with the Ambassador tasks 😊

@jdevcs
Copy link
Contributor

jdevcs commented May 29, 2024

@AnumQ , sure you can start working on this. Thanks for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x 4.0 related Enhancement Includes improvements or optimizations
Projects
None yet
Development

No branches or pull requests

3 participants