mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-24 02:58:09 +01:00
b75f812953
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
20 lines
465 B
JavaScript
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)
|
|
})
|
|
},
|
|
},
|
|
}
|
|
}
|