Explorer: Fix stake account validation (#11623)
This commit is contained in:
parent
6194a29875
commit
1592597d93
|
@ -12,7 +12,7 @@ import {
|
||||||
} from "validators/accounts/stake";
|
} from "validators/accounts/stake";
|
||||||
import BN from "bn.js";
|
import BN from "bn.js";
|
||||||
|
|
||||||
const MAX_EPOCH = new BN(2).pow(new BN(64));
|
const MAX_EPOCH = new BN(2).pow(new BN(64)).sub(new BN(1));
|
||||||
|
|
||||||
export function StakeAccountSection({
|
export function StakeAccountSection({
|
||||||
account,
|
account,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { object, StructType, number, optional, enums } from "superstruct";
|
import { object, StructType, number, nullable, enums } from "superstruct";
|
||||||
import { Pubkey } from "validators/pubkey";
|
import { Pubkey } from "validators/pubkey";
|
||||||
import { BigNum } from "validators/bignum";
|
import { BigNum } from "validators/bignum";
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ export const StakeMeta = object({
|
||||||
export type StakeAccountInfo = StructType<typeof StakeAccountInfo>;
|
export type StakeAccountInfo = StructType<typeof StakeAccountInfo>;
|
||||||
export const StakeAccountInfo = object({
|
export const StakeAccountInfo = object({
|
||||||
meta: StakeMeta,
|
meta: StakeMeta,
|
||||||
stake: optional(
|
stake: nullable(
|
||||||
object({
|
object({
|
||||||
delegation: object({
|
delegation: object({
|
||||||
voter: Pubkey,
|
voter: Pubkey,
|
||||||
|
|
Loading…
Reference in New Issue