Merge pull request #333 from sxlmnwb/patch-3
update: fix unequal update height follow in chains
This commit is contained in:
commit
0ab9d5d992
@ -175,7 +175,7 @@ export default {
|
||||
if (chain.api) {
|
||||
const index = localStorage.getItem(`${chain.chain_name}-api-index`) || 0
|
||||
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
|
||||
this.$set(chain, 'height', header.height)
|
||||
this.$set(chain, 'time', toDay(header.time))
|
||||
|
Loading…
Reference in New Issue
Block a user