Skip to content

Feedback System Service #160

@Villarley

Description

@Villarley

[FE] Feedback System Service

Objective

Build a tiny service that wraps existing feedback_system bindings for StarShop. (No binding generation.)

File

src/lib/services/feedbackSystem.service.ts

API

  • initialize(admin, signer)
  • submitFeedback(user, target, rating, comment, signer) -> { id, tx }
  • updateFeedback(user, feedbackId, rating, comment, signer) -> tx
  • deleteFeedback(user, feedbackId, signer) -> tx
  • getFeedback(feedbackId)
  • getFeedbacksForTarget(target)
  • getUserFeedbacks(user)
  • getAverageRating(target)

Tasks

  • Import client from src/lib/contracts/feedback_system.ts.
  • Implement methods above (reads w/o signer, writes with signer).
  • Validate: rating is u32, comment non-empty.
  • Return tx hash on writes; include created id on submit.

Acceptance

  • File exists and compiles.
  • Methods typed and working.
  • Read methods require no signer.
  • Write methods return tx hash (and id on create).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions