@@ -10,7 +10,7 @@ import { getRankCategory } from "@/services/constants/rollups"
1010import Tooltip from " @/components/ui/Tooltip.vue"
1111
1212/** API */
13- import { fetchPriceSeries } from " @/services/api/stats"
13+ import { fetchPriceSeries , fetchTVS } from " @/services/api/stats"
1414
1515/** Store */
1616import { useAppStore } from " @/store/app.store"
@@ -38,13 +38,14 @@ const topRollup = computed(() => {
3838 }
3939})
4040
41+ const isLoading = ref (true )
4142const series = ref ([])
4243const price = reactive ({
4344 value: 0 ,
4445 diff: 0 ,
4546 side: null ,
4647})
47-
48+ const tvs = ref ( 0 )
4849onMounted (async () => {
4950 const dataSeries = await fetchPriceSeries ({ from: parseInt (DateTime .now ().minus ({ days: 3 }).ts / 1_000 ) })
5051 series .value = dataSeries
@@ -58,6 +59,13 @@ onMounted(async () => {
5859 side = price .value - prevDayClosePrice > 0 ? " rise" : " fall"
5960 }
6061 price .side = side
62+
63+ const _tvs = await fetchTVS ({ period: null })
64+ if (_tvs .value ) {
65+ tvs .value = _tvs .value
66+ }
67+
68+ isLoading .value = false
6169})
6270< / script>
6371
@@ -132,19 +140,19 @@ onMounted(async () => {
132140 < Flex align= " center" gap= " 6" : class = " $style.stat" >
133141 < Icon name= " coins" size= " 12" color= " secondary" : class = " $style.icon" / >
134142 < Flex align= " center" gap= " 4" >
135- < Text size= " 12" weight= " 500" color= " tertiary" noWrap : class = " $style.key" > Supply : < / Text >
143+ < Text size= " 12" weight= " 500" color= " tertiary" noWrap : class = " $style.key" > TVS : < / Text >
136144
137- < Text v- if = " head.total_supply " size= " 12" weight= " 600" noWrap : class = " $style.value" >
138- {{ abbreviate (totalSupply , 2 ) }} TIA
145+ < Text v- if = " !isLoading " size= " 12" weight= " 600" noWrap : class = " $style.value" >
146+ {{ abbreviate (tvs , 2 ) }} USD
139147 < / Text >
140148 < Skeleton v- else w= " 40" h= " 12" / >
141149 < / Flex>
142150 < / Flex>
143151
144152 < template #content>
145153 < Flex align= " center" justify= " between" gap= " 8" >
146- < Text size= " 12" weight= " 500" color= " tertiary" > Total Supply : < / Text >
147- < Text size= " 12" weight= " 600" color= " secondary" > {{ abbreviate (totalSupplyUSD, 2 ) }} USD < / Text >
154+ < Text size= " 12" weight= " 500" color= " tertiary" > Total Value Secured : < / Text >
155+ < Text size= " 12" weight= " 600" color= " secondary" > {{ comma (tvs ) }} USD < / Text >
148156 < / Flex>
149157 < / template>
150158 < / Tooltip>
0 commit comments