Implement Ethereum provider wallet_getPermissions method

This commit is contained in:
Ivan Grachev 2022-07-07 15:01:23 +03:00
parent 6b5c02b905
commit 4b760e60e2
2 changed files with 3 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -203,6 +203,7 @@ class TokenaryEthereum extends EventEmitter {
case "wallet_addEthereumChain":
case "wallet_switchEthereumChain":
case "wallet_requestPermissions":
case "wallet_getPermissions":
return this._processPayload(payload);
case "eth_newFilter":
case "eth_newBlockFilter":
@ -262,6 +263,7 @@ class TokenaryEthereum extends EventEmitter {
case "wallet_switchEthereumChain":
return this.wallet_switchEthereumChain(payload);
case "wallet_requestPermissions":
case "wallet_getPermissions":
const permissions = [{"parentCapability": "eth_accounts"}];
return this.sendResponse(payload.id, permissions);
}