mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix account injection bug
It seems `selectedAddress` was removed from the keyring-controller’s state, and is used to populate the injected current account.
I couldn't help myself, I dug around, I found a PR named [changed all instances of selectedAddress to selectedAccount](f5b0795ac5
) by @Zanibas. Sorry, Kevin! Had you actually changed all instances, this bug would not have happened.
Fixes #908
This commit is contained in:
parent
73cdf0bfd4
commit
98527c1c25
@ -72,13 +72,13 @@ MetamaskInpageProvider.prototype.send = function (payload) {
|
||||
|
||||
case 'eth_accounts':
|
||||
// read from localStorage
|
||||
selectedAccount = self.publicConfigStore.get('selectedAddress')
|
||||
selectedAccount = self.publicConfigStore.get('selectedAccount')
|
||||
result = selectedAccount ? [selectedAccount] : []
|
||||
break
|
||||
|
||||
case 'eth_coinbase':
|
||||
// read from localStorage
|
||||
selectedAccount = self.publicConfigStore.get('selectedAddress')
|
||||
selectedAccount = self.publicConfigStore.get('selectedAccount')
|
||||
result = selectedAccount || '0x0000000000000000000000000000000000000000'
|
||||
break
|
||||
|
||||
@ -119,6 +119,7 @@ function remoteStoreWithLocalStorageCache (storageKey) {
|
||||
var store = new RemoteStore(initState)
|
||||
// cache the latest state locally
|
||||
store.subscribe(function (state) {
|
||||
console.log('received state update %s of %s', storageKey, state)
|
||||
localStorage[storageKey] = JSON.stringify(state)
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user