Skip to content

Commit

Permalink
fixup! make selected account the first account returned
Browse files Browse the repository at this point in the history
  • Loading branch information
rekmarks committed Dec 10, 2019
1 parent 79e8975 commit 0c04a87
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/scripts/controllers/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ class PreferencesController {

const { selectedAddressHistory } = this.store.getState()

// spare us the state update if it's unnecessary
// only update state if it's necessary
if (selectedAddressHistory[origin] !== address) {
selectedAddressHistory[origin] = address
this.store.updateState({ selectedAddressHistory })
Expand Down
1 change: 1 addition & 0 deletions app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,7 @@ module.exports = class MetamaskController extends EventEmitter {
removePermissionsFor: permissionsController.removePermissionsFor.bind(permissionsController),
updatePermittedAccounts: nodeify(permissionsController.updatePermittedAccounts, permissionsController),
legacyExposeAccounts: nodeify(permissionsController.legacyExposeAccounts, permissionsController),
handleNewAccountSelected: nodeify(permissionsController.handleNewAccountSelected, permissionsController),

getRequestAccountTabIds: (cb) => cb(null, this.getRequestAccountTabIds()),
getOpenMetamaskTabsIds: (cb) => cb(null, this.getOpenMetamaskTabsIds()),
Expand Down
4 changes: 2 additions & 2 deletions ui/app/selectors/permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {

/**
* TODO:LoginPerSite
* There are permission gains here once `domain.permissions` is converted
* to key:value instead of an array.
* There are performance gains here once `domain.permissions` is converted
* to key:value instead of an array. (requires update to rpc-cap)
*/

const permissionsSelector = (state, origin) => {
Expand Down

0 comments on commit 0c04a87

Please sign in to comment.