update votingInfo schema

This commit is contained in:
TheJuze
2023-10-02 10:47:56 +03:00
parent 4bb4798666
commit 9f39d789e5
3 changed files with 10 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
import { z } from 'zod';
import infoSchema from './info-schema.js';
const poolSchema = z.object({
allVote: z.number(),
@@ -8,7 +9,7 @@ const poolSchema = z.object({
userVote: z.number()
})
const votingInfoSchema = z.object({
const votingResultSchema = z.object({
absoluteVeTokenInVoting: z.number(),
pools: z.array(poolSchema),
userVeTokenBalance: z.number(),
@@ -18,4 +19,9 @@ const votingInfoSchema = z.object({
weeklyReward: z.number()
})
const votingInfoSchema = z.object({
result: votingResultSchema,
info: infoSchema,
});
export default votingInfoSchema;