Skip to content

Commit

Permalink
chore: add missing docs and fields to gql
Browse files Browse the repository at this point in the history
Signed-off-by: Elias Van Ootegem <[email protected]>
  • Loading branch information
EVODelavega committed Aug 21, 2024
1 parent 6525405 commit bb3ee13
Show file tree
Hide file tree
Showing 6 changed files with 274 additions and 6 deletions.
16 changes: 16 additions & 0 deletions datanode/gateway/graphql/benefit_tier_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ func (br *benefitTierResolver) MinimumEpochs(_ context.Context, obj *vega.Benefi
return int(minEpochs), nil
}

func (v *benefitTierResolver) TierNumber(_ context.Context, obj *vega.BenefitTier) (*int, error) {
if obj.TierNumber == nil {
return nil, nil
}
i := int(*obj.TierNumber)
return &i, nil
}

type volumeBenefitTierResolver VegaResolverRoot

// VolumeDiscountFactors implements VolumeBenefitTierResolver.
Expand All @@ -99,3 +107,11 @@ func (v *volumeBenefitTierResolver) VolumeDiscountFactors(ctx context.Context, o
LiquidityFactor: liq.String(),
}, nil
}

func (v *volumeBenefitTierResolver) TierNumber(_ context.Context, obj *vega.VolumeBenefitTier) (*int, error) {
if obj.TierNumber == nil {
return nil, nil
}
i := int(*obj.TierNumber)
return &i, nil
}
Loading

0 comments on commit bb3ee13

Please sign in to comment.