Create a function `revokeAccess` that disconnects any previously connected wallets
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
good point @AnumQ ! @mconnelly8 she is one of the web3.js ambassadors :)
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 )
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 😊
@AnumQ , sure you can start working on this. Thanks for your contributions.
Hey @AnumQ, are you working on this?
Hello @mconnelly8 I would like to add this. I will need some guidance on where to start as I nearly know the codebase and how it works.
No I am not working on it. Feel free to solve it😊
Mvh Anum
On Mon, 9 Sep 2024 at 20:19, Mike Connelly @.***> wrote:
Hey @AnumQ https://github.com/AnumQ, are you working on this?
— Reply to this email directly, view it on GitHub https://github.com/web3/web3.js/issues/7037#issuecomment-2338791765, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIHU544TA2VCSELV3PPDLDZVXRBHAVCNFSM6AAAAABHPORW5SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZYG44TCNZWGU . You are receiving this because you were mentioned.Message ID: <web3/web3. @.***>
@mconnelly8 @SantiagoDevRel @AnumQ Can I have access to the repo? I can't push my code/attempt for review.
remote: Permission to web3/web3.js.git denied to Allen-Muhani. fatal: unable to access 'https://github.com/web3/web3.js.git/': The requested URL returned error: 403
@Allen-Muhani directly pushing changes to main branch is not allowed, for contributions in web3.js lib create a feature branch and create PR.
For above issue, requirement is to create a web3.js plugin in new repo under your user in github, instead of adding in web3.js repo. https://docs.web3js.org/guides/web3_plugin_guide/#create-a-plugin
Hey, we recently released a Web3.js plugin that supports all popular wallet RPC methods, so we’re closing this issue as resolved. You can find more details about the plugin here: web3-plugin-wallet-rpc.