Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 12fc985

Browse files
will pankiewiczwill pankiewicz
authored andcommitted
add types to nominator db queries
1 parent 4b6b136 commit 12fc985

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/common/src/db/models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ export interface Nominator {
331331
proxyDelay?: number;
332332
rewardDestination?: string;
333333
newBondedAmount?: number;
334-
current?: string[];
334+
current?: [{ name?: string; stash?: string; identity?: any }];
335335
lastNomination?: number;
336336
createdAt?: number;
337337
now?: number;

packages/common/src/db/queries/Nominator.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@ export const setLastNomination = async (
163163
return true;
164164
};
165165

166-
export const getCurrentTargets = async (address: string): Promise<string[]> => {
166+
export const getCurrentTargets = async (
167+
address: string,
168+
): Promise<{ name?: string; stash?: string; identity?: any }[]> => {
167169
try {
168170
const nominator = await NominatorModel.findOne({
169171
address,

0 commit comments

Comments
 (0)