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