Skip to content

Commit

Permalink
Merge pull request #854 from multiversx/MergeDevelop
Browse files Browse the repository at this point in the history
Merge develop
  • Loading branch information
danielailie authored Jan 19, 2023
2 parents da9a9ab + f505867 commit 2e017bc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/modules/analytics/analytics.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ export class AnalyticsService {

for (const token of collection.tokens) {
const tokenDetails = tokensWithPrice[token.paymentToken];
if (tokenDetails && tokenDetails.length > 0) {
if (
tokenDetails &&
tokenDetails.length > 0 &&
tokenDetails[0].usdPrice
) {
priceUsd = priceUsd.plus(
computeUsd(
tokenDetails[0].usdPrice,
Expand All @@ -115,7 +119,7 @@ export class AnalyticsService {
tokens: collection.tokens,
});
}
return trending.sortedDescending((x) => x.volume);
return trending.sortedDescending((x) => parseFloat(x.volume));
}

private async getParsedEvents(
Expand Down

0 comments on commit 2e017bc

Please sign in to comment.