diff --git a/beacon-chain/rpc/apimiddleware/structs.go b/beacon-chain/rpc/apimiddleware/structs.go index e3d9ee2f7..80f37dba6 100644 --- a/beacon-chain/rpc/apimiddleware/structs.go +++ b/beacon-chain/rpc/apimiddleware/structs.go @@ -527,8 +527,8 @@ type beaconStateV2Json struct { CurrentJustifiedCheckpoint *checkpointJson `json:"current_justified_checkpoint"` FinalizedCheckpoint *checkpointJson `json:"finalized_checkpoint"` InactivityScores []string `json:"inactivity_scores"` - CurrentSyncCommittee syncCommitteeJson `json:"current_sync_committee"` - NextSyncCommittee syncCommitteeJson `json:"next_sync_committee"` + CurrentSyncCommittee *syncCommitteeJson `json:"current_sync_committee"` + NextSyncCommittee *syncCommitteeJson `json:"next_sync_committee"` } type beaconStateContainerV2Json struct { @@ -572,8 +572,8 @@ type committeeJson struct { } type syncCommitteeJson struct { - Pubkeys []string `json:"pubkeys" hex:"true"` - PubkeyAggregates string `json:"pubkey_aggregates" hex:"true"` + Pubkeys []string `json:"pubkeys" hex:"true"` + AggregatePubkey string `json:"aggregate_pubkey" hex:"true"` } type syncCommitteeValidatorsJson struct { diff --git a/shared/gateway/api_middleware_processing.go b/shared/gateway/api_middleware_processing.go index 3117f28eb..f05148b21 100644 --- a/shared/gateway/api_middleware_processing.go +++ b/shared/gateway/api_middleware_processing.go @@ -294,6 +294,9 @@ func hexToBase64Processor(v reflect.Value) error { } func base64ToHexProcessor(v reflect.Value) error { + if v.String() == "" { + return nil + } b, err := base64.StdEncoding.DecodeString(v.String()) if err != nil { return err