Skip to content

Commit

Permalink
fix: add missing method to interface
Browse files Browse the repository at this point in the history
  • Loading branch information
0xnigir1 committed Oct 11, 2024
1 parent 7d1f8a9 commit ca53f4a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
13 changes: 13 additions & 0 deletions packages/repository/src/interfaces/roundRepository.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,19 @@ export interface IRoundReadRepository {
strategyAddress: Address,
): Promise<Round | undefined>;

/**
* Retrieves a round by a specific role and role value.
* @param chainId The chain ID of the round.
* @param roleName The name of the role to filter by.
* @param roleValue The value of the role to filter by.
* @returns A promise that resolves to a Round object if found, or undefined if not found.
*/
getRoundByRole(
chainId: ChainId,
roleName: RoundRoleNames,
roleValue: string,
): Promise<Round | undefined>;

/**
* Retrieves the match token address for a specific round.
* @param chainId The chain ID of the round.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class KyselyRoundRepository implements IRoundRepository {
/* @inheritdoc */
async getRoundByRole(
chainId: ChainId,
roleName: "admin" | "manager",
roleName: RoundRoleNames,
roleValue: string,
): Promise<Round | undefined> {
return this.db
Expand Down Expand Up @@ -160,6 +160,7 @@ export class KyselyRoundRepository implements IRoundRepository {
.execute();
}

/* @inheritdoc */
async deleteManyRoundRolesByRoleAndAddress(
chainId: ChainId,
roundId: string,
Expand Down

0 comments on commit ca53f4a

Please sign in to comment.