1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-24 02:58:09 +01:00
metamask-extension/app/scripts/controllers/permissions/restrictedMethods.js
Erik Marks b75f812953
Improve LoginPerSite UX/devX and permissions logging (#7649)
Update accounts permission history on accountsChanged
Create PermissionsLogController
Fix permissions activity log pruning
Add selectors, background hooks for better UX
Make selected account the first account returned
Use enums for store keys in log controller
Add last selected address history to PreferencesController
2020-01-27 14:42:03 -08:00

20 lines
465 B
JavaScript

export default function getRestrictedMethods (permissionsController) {
return {
'eth_accounts': {
description: 'View the address of the selected account',
method: (_, res, __, end) => {
permissionsController.getKeyringAccounts()
.then((accounts) => {
res.result = accounts
end()
})
.catch((err) => {
res.error = err
end(err)
})
},
},
}
}