Skip to content

Rep Nomination document type processing. #715

@Mr-Leshiy

Description

@Mr-Leshiy

Summary

Implement a Rep Nomination specific validation according to the specification.

Details

  • Add a new RepNominationRule with the corresponding CatalystSignedDocumentValidationRule trait implementation.
  • Add a constructor
    pub async fn new<Provider>(
        doc: &CatalystSignedDocument,
        provider: &Provider,
    ) -> anyhow::Result<Self>
    where
        Provider: CatalystSignedDocumentProvider,
    {
        if doc.report().is_problematic() {
            anyhow::bail!("Provided document is not valid {:?}", doc.report())
        }
        anyhow::ensure!(
            doc.doc_type()? == &REP_NOMINATION,
            "Document must be Contest Ballot type"
        );
     // perform the same set of validation as for the `CatalystSignedDocumentValidationRule`
    ...
}
  • Add a corresponding test cases

Metadata

Metadata

Assignees

Labels

squad: gatekeepersCatalyst App Backend, System Development & Integration Team

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions