feat: add tip categories/tags system (#90)#191
Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Contract (tipstream.clar)
tip-categorymap to store category per tip IDcategory-tip-countmap for per-category aggregationsend-categorized-tippublic function wrappingsend-tipwith category storageget-tip-categoryandget-category-countread-only functionserr-invalid-category(u114) error constantTests
Frontend
send-categorized-tipcontract call with selected categorytip-categorizedevents and display category badges on tips46 contract tests passing
Closes #90