aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2017-03-23 06:41:38 +0800
committerGitHub <noreply@github.com>2017-03-23 06:41:38 +0800
commit16bdfd3d6e515e8f9a3246fe84372bfc6e2158db (patch)
tree4d851c02a2b2fdd0635a7ad6df209b1def38c9d4 /app/scripts
parent72e979909c1bf7f252776628e4a882baa1a87fcb (diff)
parent5b81f7120b3c7c3c3a16246a9d5705fcab4f91b9 (diff)
downloadtangerine-wallet-browser-16bdfd3d6e515e8f9a3246fe84372bfc6e2158db.tar
tangerine-wallet-browser-16bdfd3d6e515e8f9a3246fe84372bfc6e2158db.tar.gz
tangerine-wallet-browser-16bdfd3d6e515e8f9a3246fe84372bfc6e2158db.tar.bz2
tangerine-wallet-browser-16bdfd3d6e515e8f9a3246fe84372bfc6e2158db.tar.lz
tangerine-wallet-browser-16bdfd3d6e515e8f9a3246fe84372bfc6e2158db.tar.xz
tangerine-wallet-browser-16bdfd3d6e515e8f9a3246fe84372bfc6e2158db.tar.zst
tangerine-wallet-browser-16bdfd3d6e515e8f9a3246fe84372bfc6e2158db.zip
Merge branch 'master' into i238-kovan
Diffstat (limited to 'app/scripts')
-rw-r--r--app/scripts/lib/eth-store.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/scripts/lib/eth-store.js b/app/scripts/lib/eth-store.js
index 8812a507b..243253df2 100644
--- a/app/scripts/lib/eth-store.js
+++ b/app/scripts/lib/eth-store.js
@@ -19,6 +19,8 @@ class EthereumStore extends ObservableStore {
super({
accounts: {},
transactions: {},
+ currentBlockNumber: '0',
+ currentBlockHash: '',
})
this._provider = opts.provider
this._query = new EthQuery(this._provider)
@@ -69,6 +71,8 @@ class EthereumStore extends ObservableStore {
_updateForBlock (block) {
const blockNumber = '0x' + block.number.toString('hex')
this._currentBlockNumber = blockNumber
+ this.updateState({ currentBlockNumber: parseInt(blockNumber) })
+ this.updateState({ currentBlockHash: `0x${block.hash.toString('hex')}`})
async.parallel([
this._updateAccounts.bind(this),
this._updateTransactions.bind(this, blockNumber),
@@ -129,4 +133,4 @@ class EthereumStore extends ObservableStore {
}
-module.exports = EthereumStore \ No newline at end of file
+module.exports = EthereumStore