Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use timeframe volume instead of volume_24h in trending #6371

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/resources/trendingTokens/trendingTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async function fetchTrendingTokens({

for (const token of response.trendingTokens.data) {
const { uniqueId, address, name, symbol, chainId, decimals, trending, market, icon_url, colors } = token;
const { bought_stats } = trending.swap_data;
const { bought_stats, sold_stats } = trending.swap_data;
const highlightedFriends = (bought_stats.farcaster_users || []).reduce((friends, friend) => {
const { username, pfp_url } = friend;
if (username && pfp_url) friends.push({ username, pfp_url });
Expand All @@ -93,7 +93,7 @@ async function fetchTrendingTokens({
day: trending.pool_data.h24_price_change || 0,
},
marketCap: market.market_cap?.value || 0,
volume: market.volume_24h || 0,
volume: (bought_stats?.total_volume || 0) + (sold_stats?.total_volume || 0),
highlightedFriends,
icon_url,
colors: {
Expand Down
Loading