Skip to content

Return a typed error when a verifier stake amount is zero #2361

Description

@RUKAYAT-CODER

Background

On deposit_verifier_stake, a zero stake is rejected with the generic Error::InvalidRewardAmount, which conflates two different failures. A zero (or otherwise invalid) verifier stake should return its own typed error so callers can distinguish a bad stake from a bad reward.

Files to modify (2)

  • contracts/earn-quest/src/escrow.rs
  • contracts/earn-quest/src/errors.rs

Acceptance Criteria

  • Implemented across the listed files
  • Unit/integration tests added or updated and passing
  • No regression; follows project coding standards

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions