diff --git a/src/layouts/components/NavBarWallet.vue b/src/layouts/components/NavBarWallet.vue index 55aeaf47..df8c1ff7 100644 --- a/src/layouts/components/NavBarWallet.vue +++ b/src/layouts/components/NavBarWallet.vue @@ -3,12 +3,14 @@ import { ref } from 'vue'; import { useBlockchain, useWalletStore } from '@/stores'; const walletStore = useWalletStore() - +walletStore.$subscribe((m, s) => { + console.log(m, s) +}) diff --git a/src/modules/[chain]/index.vue b/src/modules/[chain]/index.vue index 4e8d09f0..521dd631 100644 --- a/src/modules/[chain]/index.vue +++ b/src/modules/[chain]/index.vue @@ -14,6 +14,7 @@ import ProposalListItem from '@/components/ProposalListItem.vue'; const blockchain = useBlockchain(); const store = useIndexModule(); const walletStore = useWalletStore() +const format = useFormatter() const coinInfo = computed(() => { return store.coinInfo; @@ -21,9 +22,9 @@ const coinInfo = computed(() => { onMounted(() => { store.loadDashboard(); + walletStore.loadMyAsset() }); -const format = useFormatter(); const ticker = computed(() => store.coinInfo.tickers[store.tickerIndex]); blockchain.$subscribe((m, s) => { @@ -32,6 +33,7 @@ blockchain.$subscribe((m, s) => { ['chainName', 'endpoint'].includes(m.events.key) ) { store.loadDashboard(); + walletStore.loadMyAsset() } }); function shortName(name: string, id: string) { @@ -226,10 +228,16 @@ const comLinks = [ More
-
1
-
2
-
1
-
2
+
{{ format.formatToken(walletStore.balanceOfStakingToken) }}
+
{{ format.formatToken(walletStore.stakingAmount) }}
+
{{ format.formatToken(walletStore.rewardAmount) }}
+
{{ format.formatToken(walletStore.unbondingAmount) }}
+
+ +
+
+ {{ v }} +