Merge branch 'master' into i238-kovan

feature/default_network_editable
Kevin Serrano 8 years ago committed by GitHub
commit 16bdfd3d6e
  1. 4
      app/scripts/lib/eth-store.js

@ -19,6 +19,8 @@ class EthereumStore extends ObservableStore {
super({ super({
accounts: {}, accounts: {},
transactions: {}, transactions: {},
currentBlockNumber: '0',
currentBlockHash: '',
}) })
this._provider = opts.provider this._provider = opts.provider
this._query = new EthQuery(this._provider) this._query = new EthQuery(this._provider)
@ -69,6 +71,8 @@ class EthereumStore extends ObservableStore {
_updateForBlock (block) { _updateForBlock (block) {
const blockNumber = '0x' + block.number.toString('hex') const blockNumber = '0x' + block.number.toString('hex')
this._currentBlockNumber = blockNumber this._currentBlockNumber = blockNumber
this.updateState({ currentBlockNumber: parseInt(blockNumber) })
this.updateState({ currentBlockHash: `0x${block.hash.toString('hex')}`})
async.parallel([ async.parallel([
this._updateAccounts.bind(this), this._updateAccounts.bind(this),
this._updateTransactions.bind(this, blockNumber), this._updateTransactions.bind(this, blockNumber),

Loading…
Cancel
Save