mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-27 12:56:01 +01:00
21 lines
479 B
JavaScript
21 lines
479 B
JavaScript
|
|
||
|
module.exports = function getRestrictedMethods (permissionsController) {
|
||
|
return {
|
||
|
|
||
|
'eth_accounts': {
|
||
|
description: 'View the address of the selected account',
|
||
|
method: (_, res, __, end) => {
|
||
|
permissionsController.keyringController.getAccounts()
|
||
|
.then((accounts) => {
|
||
|
res.result = accounts
|
||
|
end()
|
||
|
})
|
||
|
.catch((err) => {
|
||
|
res.error = err
|
||
|
end(err)
|
||
|
})
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
}
|