Skip to content

Commit

Permalink
feat: increased test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Mani Brar authored and Mani Brar committed Jan 22, 2025
1 parent 240f5f7 commit a25b473
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion validator-cli/src/utils/claim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,4 @@ const hashClaim = (claim: ClaimStruct) => {
);
};

export { getClaim, hashClaim, getClaimResolveState };
export { getClaim, hashClaim, getClaimResolveState, ClaimHonestState };
11 changes: 10 additions & 1 deletion validator-cli/src/utils/errors.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { BotPaths } from "./cli";
class ClaimNotFoundError extends Error {
constructor(epoch: number) {
super();
Expand All @@ -22,4 +23,12 @@ class TransactionHandlerNotDefinedError extends Error {
}
}

export { ClaimNotFoundError, ClaimNotSetError, TransactionHandlerNotDefinedError };
class InvalidBotPathError extends Error {
constructor() {
super();
this.name = "InvalidBotPath";
this.message = `Invalid path provided, Use one of: ${Object.keys(BotPaths).join("), ")}`;
}
}

export { ClaimNotFoundError, ClaimNotSetError, TransactionHandlerNotDefinedError, InvalidBotPathError };

0 comments on commit a25b473

Please sign in to comment.