Merge pull request #333 from sxlmnwb/patch-3

update: fix unequal update height follow in chains
This commit is contained in:
ping
2023-02-21 10:19:10 +08:00
committed by GitHub
+1 -1
View File
@@ -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))