Skip to content

Commit

Permalink
Fix incorrect eth_accounts update-accounts-error (#18)
Browse files Browse the repository at this point in the history
* stop logging account update error if accounts were undefined

* 4.1.1
  • Loading branch information
rekmarks authored Feb 10, 2020
1 parent 51530c2 commit 95eaf99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ module.exports = class MetamaskInpageProvider extends SafeEventEmitter {

// we should always have the correct accounts even before eth_accounts
// returns, except in cases where isInternal is true
if (isEthAccounts && !isInternal) {
if (isEthAccounts && this._state.accounts !== undefined && !isInternal) {
log.error(
`MetaMask: 'eth_accounts' unexpectedly updated accounts. Please report this bug.`,
accounts,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "metamask-inpage-provider",
"version": "4.1.0",
"version": "4.1.1",
"description": "An ethereum provider that connects over a WebExtension port.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 95eaf99

Please sign in to comment.