forked from cerc-io/cosmos-explorer
fix events
This commit is contained in:
parent
85f8ef1db5
commit
ef3599e9ca
@ -3,11 +3,6 @@ import { useBlockchain, useBaseStore } from '@/stores';
|
||||
const chainStore = useBlockchain();
|
||||
const baseStore = useBaseStore();
|
||||
chainStore.initial();
|
||||
chainStore.$subscribe((m, s) => {
|
||||
if (!Array.isArray(m.events) && m.events.key === 'endpoint') {
|
||||
// chainStore.initial();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -22,7 +22,7 @@ dashboard.initial();
|
||||
const blockchain = useBlockchain();
|
||||
// blockchain.initial()
|
||||
blockchain.$subscribe((m, s) => {
|
||||
if (!Array.isArray(m.events) && m.events.key === 'chainName') {
|
||||
if (!Array.isArray(m.events) && m.events && m.events.key === 'chainName') {
|
||||
blockchain.initial();
|
||||
}
|
||||
});
|
||||
|
@ -44,7 +44,7 @@ const ticker = computed(() => store.coinInfo.tickers[store.tickerIndex]);
|
||||
blockchain.$subscribe((m, s) => {
|
||||
if (
|
||||
!Array.isArray(m.events) &&
|
||||
['chainName', 'endpoint'].includes(m.events.key)
|
||||
['chainName', 'endpoint'].includes(m.events?.key || "")
|
||||
) {
|
||||
store.loadDashboard();
|
||||
walletStore.loadMyAsset();
|
||||
|
@ -11,7 +11,7 @@ const baseStore = useBaseStore()
|
||||
const endpoint = ref(chainStore.current?.endpoints?.rest?.at(0)?.address)
|
||||
|
||||
const chainId = computed(() => baseStore.latest?.block?.header?.chain_id || "")
|
||||
const chainName = computed(() => chainStore?.chainName || "")
|
||||
const chainName = computed(() => chainStore?.current?.prettyName || "")
|
||||
const hdPath = computed(() => {
|
||||
return `m/44'/${ chainStore.current?.coinType }/0'/0/0`
|
||||
})
|
||||
|
@ -34,6 +34,8 @@ export const useTxDialog = defineStore('txDialogStore', {
|
||||
this.sender = this.walletAddress;
|
||||
this.endpoint = this.currentEndpoint || "";
|
||||
this.params = JSON.stringify(param)
|
||||
|
||||
// console.log("dialog:", this.$state)
|
||||
}
|
||||
},
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user