Skip to content

feat: add tip categories/tags system (#90)#191

Merged
Mosas2000 merged 4 commits intomainfrom
feature/tip-categories
Feb 26, 2026
Merged

feat: add tip categories/tags system (#90)#191
Mosas2000 merged 4 commits intomainfrom
feature/tip-categories

Conversation

@Mosas2000
Copy link
Copy Markdown
Owner

Changes

Contract (tipstream.clar)

  • Add 7 standard tip categories as uint enum constants (general, content-creation, open-source, community-help, appreciation, education, bug-bounty)
  • Add tip-category map to store category per tip ID
  • Add category-tip-count map for per-category aggregation
  • Add send-categorized-tip public function wrapping send-tip with category storage
  • Add get-tip-category and get-category-count read-only functions
  • Add err-invalid-category (u114) error constant

Tests

  • 4 new contract tests: valid categorized tip, invalid category rejection, count tracking, category read

Frontend

  • Category dropdown selector in SendTip component
  • Send uses send-categorized-tip contract call with selected category
  • Category shown in confirmation dialog
  • Category filter dropdown in TipHistory
  • Parse tip-categorized events and display category badges on tips

46 contract tests passing

Closes #90

- Add 7 standard categories: general, content-creation, open-source,
  community-help, appreciation, education, bug-bounty
- Add tip-category and category-tip-count maps
- Add send-categorized-tip function wrapping send-tip with category tag
- Add get-tip-category and get-category-count read-only functions
- Add err-invalid-category (u114) for out-of-range categories
- Test send-categorized-tip with valid category
- Test rejection of invalid category (u114 error)
- Test category count tracking across multiple tips
- Test get-tip-category read-only function
- Add category dropdown to SendTip with 7 standard categories
- Use send-categorized-tip contract call instead of send-tip
- Show selected category in confirmation dialog
- Add category filter dropdown to TipHistory
- Parse tip-categorized events and map categories to tips
- Display category badges on tip history entries
@Mosas2000 Mosas2000 merged commit 3b1a2ec into main Feb 26, 2026
1 of 3 checks passed
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.

Add tip categories or tags for organizing tips by purpose

1 participant