change name to chain_id

This commit is contained in:
liangping 2022-03-10 19:57:01 +08:00
parent 2253023459
commit d0ca90efca

View File

@ -48,8 +48,8 @@
/></b-link> /></b-link>
</b-media-aside> </b-media-aside>
<b-media-body class="my-auto"> <b-media-body class="my-auto">
<h6 class="mb-0 text-uppercase"> <h6 class="mb-0 ">
{{ selected_chain.chain_name }} <span class="text-uppercase">{{ chainid || selected_chain.chain_name }}</span>
</h6> </h6>
<small id="data-provider"> <small id="data-provider">
{{ currentApi }} ({{ selected_chain.sdk_version || '-' }}) {{ currentApi }} ({{ selected_chain.sdk_version || '-' }})
@ -199,6 +199,7 @@ export default {
variant: 'success', variant: 'success',
tips: 'Synced', tips: 'Synced',
index: 0, index: 0,
chainid: '',
} }
}, },
computed: { computed: {
@ -242,6 +243,7 @@ export default {
this.index = Number(s) this.index = Number(s)
this.$store.commit('setHeight', 0) this.$store.commit('setHeight', 0)
this.$http.getLatestBlock().then(block => { this.$http.getLatestBlock().then(block => {
this.chainid = block.block.header.chain_id
this.$store.commit('setHeight', Number(block.block.header.height)) this.$store.commit('setHeight', Number(block.block.header.height))
if (timeIn(block.block.header.time, 1, 'm')) { if (timeIn(block.block.header.time, 1, 'm')) {
this.variant = 'danger' this.variant = 'danger'