web3/web3.js

Create a function `revokeAccess` that disconnects any previously connected wallets

Opened this issue ยท 4 comments

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 )
AnumQ commented

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.