inpage - set web3.eth.defaultAccount correctly

feature/default_network_editable
kumavis 8 years ago
parent 2fa60cfcbf
commit 7ccaa263d2
  1. 2
      app/scripts/inpage.js
  2. 2
      app/scripts/metamask-controller.js

@ -52,7 +52,7 @@ reloadStream.once('data', triggerReload)
// set web3 defaultAccount
inpageProvider.publicConfigStore.subscribe(function (state) {
web3.eth.defaultAccount = state.PreferencesController.selectedAddress
web3.eth.defaultAccount = state.selectedAddress
})
//

@ -156,7 +156,7 @@ module.exports = class MetamaskController extends EventEmitter {
function selectPublicState(state) {
const result = { selectedAddress: undefined }
try {
result.selectedAddress = state.KeyringController.selectedAddress
result.selectedAddress = state.PreferencesController.selectedAddress
} catch (_) {}
return result
}

Loading…
Cancel
Save