fix: Best/Worst Performer compared personal ROI, not coins against each other

best/worst were picked by profit_loss_percent (return since the user's own
purchase price), so a coin bought cheap long ago could show as "best"
without actually being the strongest mover right now. Switched to
price_change_24h — the same market-price move already shown in the table's
24h% column — so the comparison is coins against each other by how they're
actually performing today, independent of when/at what price each was
bought. 24h was the user's explicit choice over 1h/7d.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01855PiW5Wd8n4aRW4n9kByY
This commit is contained in:
ZProger
2026-08-30 04:59:35 +03:00
parent 19d8aeda3a
commit dc9421e08a
2 changed files with 14 additions and 8 deletions

View File

@@ -158,7 +158,7 @@ const ru = {
"crypto.stats.costBasisHint": "сумма покупок по факту",
"crypto.stats.bestPerformer": "Лучший рост",
"crypto.stats.worstPerformer": "Худшее падение",
"crypto.stats.since": "с момента покупки {{name}}",
"crypto.stats.change24h": "изменение цены за 24ч",
"roi.calculator.title": "Калькулятор ROI",
"roi.calculator.investmentLabel": "Сумма инвестиции",
@@ -619,7 +619,7 @@ const en: Record<keyof typeof ru, string> = {
"crypto.stats.costBasisHint": "actual amount spent buying",
"crypto.stats.bestPerformer": "Best Performer",
"crypto.stats.worstPerformer": "Worst Performer",
"crypto.stats.since": "since buying {{name}}",
"crypto.stats.change24h": "24h price change",
"roi.calculator.title": "ROI Calculator",
"roi.calculator.investmentLabel": "Investment amount",