Skip to content

[Markets] Build user bet history view - #1441

Merged
hman38705 merged 1 commit into
solutions-plug:mainfrom
samuel2926i39-art:feat/1365-user-bet-history
Aug 29, 2026
Merged

[Markets] Build user bet history view#1441
hman38705 merged 1 commit into
solutions-plug:mainfrom
samuel2926i39-art:feat/1365-user-bet-history

Conversation

@samuel2926i39-art

Copy link
Copy Markdown

Summary

Adds frontend/src/app/account/bets/page.tsx, a wallet-gated view listing bets for the connected address, sourced from GET /api/v1/blockchain/users/:user/bets.

Context

  • Page requires a connected wallet before querying; a local useConnectedWallet hook stands in for Features/issue 4 featured markets api #77's shared wallet integration (same shape — address + account-change subscription) until that lands, then it's a one-line swap.
  • The "no bets" case (error 142 BetNotFound) renders an empty-state message instead of an error, per feat: Add Virtual AMM (CPMM) for instant bet liquidity (#26) #36's error-mapping convention.
  • Before: no account-scoped bet history existed.
  • After: the page shows only the connected address's bets, paginated, and re-fetches automatically whenever the connected wallet account changes — never leaving the previous address's list on screen.

Testing

  • Manually verified: no wallet connected → prompt to connect, no fetch fired.
  • Manually verified: switching the mocked accountChanged event triggers a re-fetch and clears the prior list before the new one loads.
  • Manually verified: 404/142 response renders "No bets found" rather than an error state.

Closes #1365

@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@samuel2926i39-art Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@hman38705
hman38705 merged commit 517c96e into solutions-plug:main Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Markets] Build user bet history view

2 participants