Skip to content

Commit

Permalink
update accounts permission history on accountsChanged
Browse files Browse the repository at this point in the history
Create PermissionsLogController
Fix permissions activity log pruning
Add selectors, background hooks for better UX
Make selected account the first account returned
  • Loading branch information
rekmarks committed Dec 16, 2019
1 parent f441f83 commit 8f429e2
Show file tree
Hide file tree
Showing 14 changed files with 672 additions and 342 deletions.
61 changes: 61 additions & 0 deletions app/scripts/controllers/permissions/enums.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
module.exports = {
WALLET_PREFIX: 'wallet_',
HISTORY_STORE_KEY: 'permissionsHistory',
LOG_STORE_KEY: 'permissionsLog',
METADATA_STORE_KEY: 'domainMetadata',
CAVEAT_NAMES: {
exposedAccounts: 'exposedAccounts',
},
NOTIFICATION_NAMES: {
accountsChanged: 'wallet_accountsChanged',
},
SAFE_METHODS: [
'web3_sha3',
'net_listening',
'net_peerCount',
'net_version',
'eth_blockNumber',
'eth_call',
'eth_chainId',
'eth_coinbase',
'eth_estimateGas',
'eth_gasPrice',
'eth_getBalance',
'eth_getBlockByHash',
'eth_getBlockByNumber',
'eth_getBlockTransactionCountByHash',
'eth_getBlockTransactionCountByNumber',
'eth_getCode',
'eth_getFilterChanges',
'eth_getFilterLogs',
'eth_getLogs',
'eth_getStorageAt',
'eth_getTransactionByBlockHashAndIndex',
'eth_getTransactionByBlockNumberAndIndex',
'eth_getTransactionByHash',
'eth_getTransactionCount',
'eth_getTransactionReceipt',
'eth_getUncleByBlockHashAndIndex',
'eth_getUncleByBlockNumberAndIndex',
'eth_getUncleCountByBlockHash',
'eth_getUncleCountByBlockNumber',
'eth_getWork',
'eth_hashrate',
'eth_mining',
'eth_newBlockFilter',
'eth_newFilter',
'eth_newPendingTransactionFilter',
'eth_protocolVersion',
'eth_sendRawTransaction',
'eth_sendTransaction',
'eth_sign',
'personal_sign',
'eth_signTypedData',
'eth_signTypedData_v1',
'eth_signTypedData_v3',
'eth_submitHashrate',
'eth_submitWork',
'eth_syncing',
'eth_uninstallFilter',
],
}
Loading

0 comments on commit 8f429e2

Please sign in to comment.