Skip to content

Update accountsChanged event when logged out#8

Merged
danfinlay merged 1 commit intoMetaMask:masterfrom
Gudahtt:update-empty-accounts-changed-event
Sep 12, 2019
Merged

Update accountsChanged event when logged out#8
danfinlay merged 1 commit intoMetaMask:masterfrom
Gudahtt:update-empty-accounts-changed-event

Conversation

@Gudahtt
Copy link
Copy Markdown
Member

@Gudahtt Gudahtt commented Sep 12, 2019

The accountsChanged event would previously return [undefined] upon logout (i.e. when selectedAddress was undefined).

Instead an empty array is now returned if the user is not logged in. This seems more semantically correct, and is more in-line with EIP-1193, which states that the event should emit an array of strings.

The `accountsChanged` event would previously return `[undefined]` upon
logout (i.e. when `selectedAddress` was undefined).

Instead an empty array is now returned if the user is not logged in.
This seems more semantically correct, and is more in-line with
EIP-1193, which states that the event should emit an array of strings.
@danfinlay danfinlay merged commit a68536a into MetaMask:master Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants