Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
rekmarks committed Oct 23, 2019
1 parent 854c26b commit 6097392
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions app/scripts/controllers/permissions/loggerMiddleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,24 +81,24 @@ module.exports = function createLoggerMiddleware ({

let accounts
const entries = result
? result.map(perm => {
? result.map(perm => {
if (perm.parentCapability === 'eth_accounts') {
accounts = getAccountsFromPermission(perm)
}
return perm.parentCapability
})
.reduce((acc, m) => {
if (requestedMethods.includes(m)) {
acc[m] = {
lastApproved: time,
.reduce((acc, m) => {
if (requestedMethods.includes(m)) {
acc[m] = {
lastApproved: time,
}
if (m === 'eth_accounts') {
acc[m].accounts = accounts
}
}
if (m === 'eth_accounts') {
acc[m].accounts = accounts
}
}
return acc
}, {})
: {}
return acc
}, {})
: {}

if (Object.keys(entries).length > 0) {
commitHistory(origin, entries, accounts)
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/controllers/permissions/requestMiddleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { ethErrors } = require('eth-json-rpc-errors')
* Create middleware for preprocessing permissions requests.
*/
module.exports = function createRequestMiddleware ({
store, storeKey, getAccounts
store, storeKey, getAccounts,
}) {
return createAsyncMiddleware(async (req, res, next) => {

Expand Down

0 comments on commit 6097392

Please sign in to comment.