Skip to content

Commit

Permalink
Merge pull request #41 from MetaMask/fix-descriptions
Browse files Browse the repository at this point in the history
Fix missing permissions descriptions in prompt
  • Loading branch information
rekmarks authored Oct 2, 2019
2 parents 1aa64ad + 8f80668 commit f8e274d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
13 changes: 11 additions & 2 deletions app/scripts/controllers/permissions/permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,17 @@ class PermissionsController {
*/
_initializePermissions (restoredState) {

// TODO:permissions stop persisting permissionsDescriptions and remove this line
const initState = { ...restoredState, permissionsRequests: [] }
const initState = Object.keys(restoredState)
.filter(k => {
return ![
'permissionsDescriptions',
'permissionsRequests',
].includes(k)
})
.reduce((acc, k) => {
acc[k] = restoredState[k]
return acc
}, {})

this.testProfile = {
name: 'Dan Finlay',
Expand Down
1 change: 0 additions & 1 deletion app/scripts/controllers/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ class PluginsController extends EventEmitter {
console.log('running add plugin with ', plugin)
const { sourceCode, initialPermissions } = plugin


const ethereumProvider = this.setupProvider(pluginName, async () => { return {name: pluginName } }, true)

return new Promise((resolve, reject) => {
Expand Down

0 comments on commit f8e274d

Please sign in to comment.