Fix refreshing block number on status view (#6610)
This commit is contained in:
parent
965727c5d3
commit
ea6d517a87
@ -24,7 +24,7 @@ export default class StatusStore {
|
|||||||
@observable netPort = new BigNumber(0);
|
@observable netPort = new BigNumber(0);
|
||||||
@observable nodeName = '';
|
@observable nodeName = '';
|
||||||
@observable rpcSettings = {};
|
@observable rpcSettings = {};
|
||||||
|
@observable blockNumber = new BigNumber(0);
|
||||||
@observable coinbase = '';
|
@observable coinbase = '';
|
||||||
@observable extraData = '';
|
@observable extraData = '';
|
||||||
@observable gasFloorTarget = new BigNumber(0);
|
@observable gasFloorTarget = new BigNumber(0);
|
||||||
@ -46,9 +46,10 @@ export default class StatusStore {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@action setStatus ({ hashrate }) {
|
@action setStatus ({ hashrate, blockNumber }) {
|
||||||
transaction(() => {
|
transaction(() => {
|
||||||
this.hashrate = hashrate;
|
this.hashrate = hashrate;
|
||||||
|
this.blockNumber = blockNumber;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,13 +109,14 @@ export default class StatusStore {
|
|||||||
|
|
||||||
return Promise
|
return Promise
|
||||||
.all([
|
.all([
|
||||||
this.api.eth.hashrate()
|
this.api.eth.hashrate(),
|
||||||
|
this.api.eth.blockNumber()
|
||||||
])
|
])
|
||||||
.then(([
|
.then(([
|
||||||
hashrate
|
hashrate, blockNumber
|
||||||
]) => {
|
]) => {
|
||||||
this.setStatus({
|
this.setStatus({
|
||||||
hashrate
|
hashrate, blockNumber
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user