update: fix unequal update height follow in chains
- anti zero "0" height club Signed-off-by: Salman Wahib <sxlmnwb@sxlzptprjkt.xyz>
This commit is contained in:
parent
f16c1070a7
commit
7b06ce8df7
@ -175,7 +175,7 @@ export default {
|
|||||||
if (chain.api) {
|
if (chain.api) {
|
||||||
const index = localStorage.getItem(`${chain.chain_name}-api-index`) || 0
|
const index = localStorage.getItem(`${chain.chain_name}-api-index`) || 0
|
||||||
const host = Array.isArray(chain.api) ? chain.api[index] : chain.api
|
const host = Array.isArray(chain.api) ? chain.api[index] : chain.api
|
||||||
fetch(`${host}/blocks/latest`).then(res => res.json()).then(b => {
|
fetch(`${host}/cosmos/base/tendermint/v1beta1/blocks/latest`).then(res => res.json()).then(b => {
|
||||||
const { header } = b.block
|
const { header } = b.block
|
||||||
this.$set(chain, 'height', header.height)
|
this.$set(chain, 'height', header.height)
|
||||||
this.$set(chain, 'time', toDay(header.time))
|
this.$set(chain, 'time', toDay(header.time))
|
||||||
|
Loading…
Reference in New Issue
Block a user