diff --git a/src/lib/services/validator.ts b/src/lib/services/validator.ts index 3cb9cde6c..a3e50e814 100644 --- a/src/lib/services/validator.ts +++ b/src/lib/services/validator.ts @@ -84,7 +84,6 @@ const zValidatorsResponse = z total_voting_power: zBig, }) .transform(snakeToCamel); - export type ValidatorsResponse = z.infer; export const getValidators = async ( @@ -112,15 +111,10 @@ export const getValidators = async ( const zValidatorDataResponse = z .object({ info: zValidatorData.nullable(), - self_voting_power: z.string(), - total_voting_power: z.string(), + self_voting_power: zBig, + total_voting_power: zBig, }) - .transform(({ info, self_voting_power, total_voting_power }) => ({ - info, - selfVotingPower: big(self_voting_power), - totalVotingPower: big(total_voting_power), - })); - + .transform(snakeToCamel); export type ValidatorDataResponse = z.infer; export const getValidatorData = async (