diff --git a/src/backend/platforms/insight.ts b/src/backend/platforms/insight.ts index 1e466e8..cfcfe8a 100644 --- a/src/backend/platforms/insight.ts +++ b/src/backend/platforms/insight.ts @@ -5,6 +5,7 @@ import axios from "axios"; import {FetchedQuestion, Platform} from "."; import {QuestionOption} from "../../common/types"; import toMarkdown from "../utils/toMarkdown"; +import { average } from "../../utils"; /* Definitions */ const platformName = "insight"; @@ -318,6 +319,19 @@ export const insight: Platform = { // return results; }, calculateStars(data) { - return 2; + let nuno = () => { + if((data.qualityindicators.volume || 0) > 10000){ + return 4 + } else if((data.qualityindicators.volume || 0) > 1000){ + return 3 + } else{ + return 2 + } + } + let eli = () => null; + let misha = () => null; + let starsDecimal = average([nuno()]); //, eli(data), misha(data)]) + let starsInteger = Math.round(starsDecimal); + return starsInteger; } }; diff --git a/src/web/questions/components/QuestionCard/QuestionFooter.tsx b/src/web/questions/components/QuestionCard/QuestionFooter.tsx index e60badb..837be7c 100644 --- a/src/web/questions/components/QuestionCard/QuestionFooter.tsx +++ b/src/web/questions/components/QuestionCard/QuestionFooter.tsx @@ -74,7 +74,7 @@ const getCurrencySymbolIfNeeded = ({ "openInterest", "liquidity", ]; - let dollarPlatforms = ["predictit", "kalshi", "polymarket"]; + let dollarPlatforms = ["predictit", "kalshi", "polymarket", "insight"]; if (indicatorsWhichNeedCurrencySymbol.includes(indicator)) { if (dollarPlatforms.includes(platform)) { return "$";