diff --git a/src/views/Uptime.vue b/src/views/Uptime.vue index 878a2b49..15f68a9f 100644 --- a/src/views/Uptime.vue +++ b/src/views/Uptime.vue @@ -12,12 +12,13 @@ - {{ x.validator.moniker?x.validator.moniker:x.address }} + {{ index+1 }} {{ x.validator.moniker }}
height - 50; i -= 1) { + blocks.unshift({ sigs: {}, height: i }) + promise = promise.then(() => new Promise(resolve => { + this.fetch_status(i, height, resolve) + })) } + const sigs = {} d.block.last_commit.signatures.forEach(x => { sigs[x.validator_address] = !!x.signature @@ -101,8 +106,9 @@ export default { this.timer = setInterval(this.fetch_latest, 6000) }) }, - fetch_status(height, lastHeight) { + fetch_status(height, lastHeight, resolve) { return this.$http.getBlockByHeight(height).then(res => { + resolve() if (height !== lastHeight) { const sigs = {} res.block.last_commit.signatures.forEach(x => {