fix: vote timestamp is nullable (#15774)

This commit is contained in:
Josh 2021-03-09 07:50:37 -08:00 committed by GitHub
parent a23e653fa1
commit 61c7ce857e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 2 deletions

View File

@ -1,6 +1,14 @@
/* eslint-disable @typescript-eslint/no-redeclare */
import { array, number, optional, pick, string, StructType } from "superstruct";
import {
array,
nullable,
number,
optional,
pick,
string,
StructType,
} from "superstruct";
import { Pubkey } from "validators/pubkey";
export type InitializeInfo = StructType<typeof InitializeInfo>;
@ -32,7 +40,7 @@ export const VoteInfo = pick({
vote: pick({
hash: string(),
slots: array(number()),
timestamp: optional(number()),
timestamp: optional(nullable(number())),
}),
});