Skip to content

fix(rewards-program): add missing validate() calls to processors#36

Merged
dev-jodee merged 1 commit into
mainfrom
fix/add-missing-validate-calls
Apr 22, 2026
Merged

fix(rewards-program): add missing validate() calls to processors#36
dev-jodee merged 1 commit into
mainfrom
fix/add-missing-validate-calls

Conversation

@dev-jodee
Copy link
Copy Markdown
Collaborator

Summary

  • Adds ix.data.validate()? after try_from in 6 processors that were missing it:
    • ClaimDirect
    • ClaimMerkle
    • CloseDirectDistribution
    • CloseDirectRecipient
    • CloseMerkleDistribution
    • CloseMerkleClaim
  • Currently all validate() implementations return Ok(()), but skipping the call creates latent risk if validation logic is added later

Audit suggestion: #1

Test plan

  • cargo test -p rewards-program --lib
  • cargo test -p tests-rewards-program --lib (all 204 integration tests)

Add ix.data.validate() to ClaimDirect, ClaimMerkle,
CloseDirectDistribution, CloseDirectRecipient,
CloseMerkleDistribution, and CloseMerkleClaim processors.

Currently all validate() implementations are no-ops, but skipping
the call creates latent risk if validation logic is added later.
@dev-jodee dev-jodee requested a review from amilz April 22, 2026 18:58
@dev-jodee dev-jodee merged commit 31fa899 into main Apr 22, 2026
7 checks passed
@dev-jodee dev-jodee deleted the fix/add-missing-validate-calls branch April 22, 2026 18:58
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.

1 participant