Skip to content

Commit

Permalink
fix: table now shows correct and complete values
Browse files Browse the repository at this point in the history
  • Loading branch information
kenodressel committed Jun 21, 2024
1 parent 5501cce commit d7633b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions src/components/explore/TokenTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<script>
import BaseTable from '@/components/explore/BaseTable.vue';
import { formatUsdPretty } from '@/lib/utils';
import BigNumber from 'bignumber.js';
export default {
name: 'TokenTable',
Expand All @@ -34,8 +35,8 @@ export default {
align: 'right',
sortable: true,
},
{ key: 'price', label: 'Price', align: 'right', sortable: true },
{ key: 'tvl', label: 'TVL', align: 'right', sortable: true },
{ key: 'fdv', label: 'FDV', align: 'right', sortable: true },
{ key: 'priceChangeDay', label: 'Price Change (24h)', align: 'right', sortable: true },
{ key: 'priceChangeMonth', label: 'Price Change (30D)', align: 'right', sortable: true },
{ key: 'volumeDay', label: 'Volume (24h)', align: 'right', sortable: true },
Expand All @@ -60,16 +61,16 @@ export default {
text: formatUsdPretty(token.tvlUsd, 0),
value: token.tvlUsd,
},
fdv: {
text: formatUsdPretty(token.fdvUsd, 0),
value: token.fdvUsd,
price: {
text: formatUsdPretty(token.priceUsd, 0),
value: token.priceUsd,
},
priceChangeDay: {
text: `${token.priceChangeDay}%`,
text: `${new BigNumber(token.priceChangeDay).toFixed(2)}%`,
value: token.priceChangeDay,
},
priceChangeMonth: {
text: `${token.priceChangeMonth}%`,
text: `${new BigNumber(token.priceChangeMonth).toFixed(2)}%`,
value: token.priceChangeMonth,
},
volumeDay: {
Expand Down
4 changes: 2 additions & 2 deletions src/views/ExploreView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<TransactionTable :transactions="transactionTable" :page-size="20" />
</div>
<div v-if="activeTab === 'Tokens'">
<TokenTable v-if="activeTab === 'Tokens'" :tokens="tokenTable" />
<TokenTable v-if="activeTab === 'Tokens'" :tokens="tokenTable" :page-size="20" />
</div>
<DividerLine />

Expand Down Expand Up @@ -96,7 +96,7 @@ export default defineComponent({
pairs: [],
history: [],
tokenMap: new Map(),
activeTab: 'Pairs',
activeTab: 'Tokens',
loading: false,
};
},
Expand Down

0 comments on commit d7633b5

Please sign in to comment.