aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts
diff options
context:
space:
mode:
authorDan Finlay <flyswatter@users.noreply.github.com>2017-03-23 06:39:20 +0800
committerGitHub <noreply@github.com>2017-03-23 06:39:20 +0800
commit9545ef3ba80b7abeffacb7914bd4232f9a22a5e1 (patch)
tree840ee52c25480980f66d3e3ed4857457b3048f46 /app/scripts
parent5d149258427b25f34dca89e5dfaba57a4f1cb95b (diff)
parent5b81f7120b3c7c3c3a16246a9d5705fcab4f91b9 (diff)
downloadtangerine-wallet-browser-9545ef3ba80b7abeffacb7914bd4232f9a22a5e1.tar.gz
tangerine-wallet-browser-9545ef3ba80b7abeffacb7914bd4232f9a22a5e1.tar.zst
tangerine-wallet-browser-9545ef3ba80b7abeffacb7914bd4232f9a22a5e1.zip
Merge branch 'master' into i1193-errorstylefix
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