Last Buy side-rail YOU score shows huge countdown when wallet has no buys #369

Closed
opened 2026-07-09 07:56:57 +00:00 by PlasticDigits · 3 comments
PlasticDigits commented 2026-07-09 07:56:57 +00:00 (Migrated from gitlab.com)

Bug

When a connected wallet has not bought in the current Last Buy epoch (or has never bought), the side-rail YOU row under Last Buy shows a huge countdown/score instead of an empty state.

Expected: show No Buys.

Likely cause

Indexer GET /v1/arena/wallet/{address}/stats current_scores for last_buy uses latest_buy_sec_in_epoch, which returns "0" when the wallet has no buys in that epoch.

Frontend resolveViewerPodiumValueRaw → formatViewerPodiumScoreLine treats that "0" as a unix timestamp (winnerBuySec), so formatLastBuySecondsAgo(now, 0) renders ~epoch-seconds-since-1970 as a compact hh:mm:ss (huge number).

Acceptance

  • Connected wallet with no Last Buy activity in the current epoch: YOU score = No Buys (not a huge timer).
  • Connected wallet with a real last-buy timestamp still shows relative/compact ago correctly.
  • Unit coverage for the empty / "0" score path.

Report

User QA: "When user hasnt buyed it shows a huge number in you - last buy side bar as their score (should just be No Buys)"

## Bug When a connected wallet has not bought in the current Last Buy epoch (or has never bought), the side-rail **YOU** row under Last Buy shows a huge countdown/score instead of an empty state. Expected: show **No Buys**. ## Likely cause Indexer `GET /v1/arena/wallet/{address}/stats` `current_scores` for `last_buy` uses `latest_buy_sec_in_epoch`, which returns `"0"` when the wallet has no buys in that epoch. Frontend `resolveViewerPodiumValueRaw` → `formatViewerPodiumScoreLine` treats that `"0"` as a unix timestamp (`winnerBuySec`), so `formatLastBuySecondsAgo(now, 0)` renders ~epoch-seconds-since-1970 as a compact `hh:mm:ss` (huge number). ## Acceptance - Connected wallet with no Last Buy activity in the current epoch: YOU score = `No Buys` (not a huge timer). - Connected wallet with a real last-buy timestamp still shows relative/compact ago correctly. - Unit coverage for the empty / `"0"` score path. ## Report User QA: \"When user hasnt buyed it shows a huge number in you - last buy side bar as their score (should just be No Buys)\"
PlasticDigits commented 2026-07-09 07:58:48 +00:00 (Migrated from gitlab.com)

mentioned in commit 1f600d150e

mentioned in commit 1f600d150eb60f8f3e8334fb5cbd1a5c7df52f0f
PlasticDigits commented 2026-07-09 07:58:53 +00:00 (Migrated from gitlab.com)

mentioned in merge request !540

mentioned in merge request !540
PlasticDigits commented 2026-07-11 01:37:06 +00:00 (Migrated from gitlab.com)

mentioned in commit 4b420e4ad5

mentioned in commit 4b420e4ad5d869dad4c825d9493c55b8ac7b667b
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-07-11 01:37:06 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
code/yieldomega#369
No description provided.