fix endpoint switch error

This commit is contained in:
liangping 2023-05-20 18:06:22 +08:00
parent ef3599e9ca
commit 349813929b

View File

@ -13,16 +13,17 @@ import { useDashboard } from '@/stores/useDashboard';
import NavBarI18n from './NavBarI18n.vue';
import NavBarWallet from './NavBarWallet.vue';
import { useBlockchain } from '@/stores';
import { computed } from 'vue';
const { appRouteTransition } = useThemeConfig();
const dashboard = useDashboard();
dashboard.initial();
const blockchain = useBlockchain();
// blockchain.initial()
const current = ref("")
blockchain.$subscribe((m, s) => {
if (!Array.isArray(m.events) && m.events && m.events.key === 'chainName') {
if(current.value != s.chainName) {
current.value = s.chainName
blockchain.initial();
}
});