Skip to content

Commit

Permalink
Merge pull request #11439 from vegaprotocol/fix_gts
Browse files Browse the repository at this point in the history
fix: Add missing assignment to epoch to and from in gameTeamScores re…
  • Loading branch information
ze97286 committed Jul 10, 2024
2 parents f3d2d75 + c4c81ed commit 87ad1d6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
- [11409](https://github.com/vegaprotocol/vega/issues/11409) - When updating a capped market - copy the cap from the existing market definition.
- [11415](https://github.com/vegaprotocol/vega/issues/11415) - End long block auction when expired.
- [11419](https://github.com/vegaprotocol/vega/issues/11419) - Fix long block auction extension to be calculated from current time.
- [11438](https://github.com/vegaprotocol/vega/issues/11438) - Add missing assignment to epoch to and from in `gameTeamScores` resolvers.

## 0.76.1

Expand Down
32 changes: 27 additions & 5 deletions datanode/gateway/graphql/resolvers.go
Original file line number Diff line number Diff line change
Expand Up @@ -857,18 +857,29 @@ func (r *myQueryResolver) GamePartyScores(ctx context.Context, filter *GameParty
gameIds := []string{}
teamIds := []string{}
partyIds := []string{}
var epochFrom, epochTo *uint64

if filter != nil {
gameIds = filter.GameIds
teamIds = filter.TeamIds
partyIds = filter.PartyIds
if filter.EpochFrom != nil {
ef := uint64(*filter.EpochFrom)
epochFrom = &ef
}
if filter.EpochTo != nil {
et := uint64(*filter.EpochTo)
epochTo = &et
}
}

req := v2.ListGamePartyScoresRequest{
Filter: &v2.GamePartyScoresFilter{
GameIds: gameIds,
TeamIds: teamIds,
PartyIds: partyIds,
GameIds: gameIds,
TeamIds: teamIds,
PartyIds: partyIds,
EpochFrom: epochFrom,
EpochTo: epochTo,
},
Pagination: pagination,
}
Expand All @@ -882,16 +893,27 @@ func (r *myQueryResolver) GamePartyScores(ctx context.Context, filter *GameParty
func (r *myQueryResolver) GameTeamScores(ctx context.Context, filter *GameTeamScoreFilter, pagination *v2.Pagination) (*v2.GameTeamScoresConnection, error) {
gameIds := []string{}
teamIds := []string{}
var epochFrom, epochTo *uint64

if filter != nil {
gameIds = filter.GameIds
teamIds = filter.TeamIds
if filter.EpochFrom != nil {
ef := uint64(*filter.EpochFrom)
epochFrom = &ef
}
if filter.EpochTo != nil {
et := uint64(*filter.EpochTo)
epochTo = &et
}
}

req := v2.ListGameTeamScoresRequest{
Filter: &v2.GameTeamScoresFilter{
GameIds: gameIds,
TeamIds: teamIds,
GameIds: gameIds,
TeamIds: teamIds,
EpochFrom: epochFrom,
EpochTo: epochTo,
},
Pagination: pagination,
}
Expand Down

0 comments on commit 87ad1d6

Please sign in to comment.