mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +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)
|
||
|
})
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
}
|