Skip to content

Commit

Permalink
chore: fix go ctx arg naming in ics29 grpc queries (#1226)
Browse files Browse the repository at this point in the history
  • Loading branch information
damiannolan authored Apr 7, 2022
1 parent 89c8cf8 commit 8451c63
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions modules/apps/29-fee/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ import (

var _ types.QueryServer = Keeper{}

// IncentivizedPackets implements the IncentivizedPackets gRPC method
func (k Keeper) IncentivizedPackets(c context.Context, req *types.QueryIncentivizedPacketsRequest) (*types.QueryIncentivizedPacketsResponse, error) {
// IncentivizedPackets implements the Query/IncentivizedPackets gRPC method
func (k Keeper) IncentivizedPackets(goCtx context.Context, req *types.QueryIncentivizedPacketsRequest) (*types.QueryIncentivizedPacketsResponse, error) {
if req == nil {
return nil, status.Error(codes.InvalidArgument, "empty request")
}

ctx := sdk.UnwrapSDKContext(c).WithBlockHeight(int64(req.QueryHeight))
ctx := sdk.UnwrapSDKContext(goCtx).WithBlockHeight(int64(req.QueryHeight))

var identifiedPackets []types.IdentifiedPacketFees
store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.FeesInEscrowPrefix))
Expand All @@ -45,13 +45,13 @@ func (k Keeper) IncentivizedPackets(c context.Context, req *types.QueryIncentivi
}, nil
}

// IncentivizedPacket implements the IncentivizedPacket gRPC method
func (k Keeper) IncentivizedPacket(c context.Context, req *types.QueryIncentivizedPacketRequest) (*types.QueryIncentivizedPacketResponse, error) {
// IncentivizedPacket implements the Query/IncentivizedPacket gRPC method
func (k Keeper) IncentivizedPacket(goCtx context.Context, req *types.QueryIncentivizedPacketRequest) (*types.QueryIncentivizedPacketResponse, error) {
if req == nil {
return nil, status.Error(codes.InvalidArgument, "empty request")
}

ctx := sdk.UnwrapSDKContext(c).WithBlockHeight(int64(req.QueryHeight))
ctx := sdk.UnwrapSDKContext(goCtx).WithBlockHeight(int64(req.QueryHeight))

feesInEscrow, exists := k.GetFeesInEscrow(ctx, req.PacketId)
if !exists {
Expand All @@ -65,7 +65,7 @@ func (k Keeper) IncentivizedPacket(c context.Context, req *types.QueryIncentiviz
}, nil
}

// IncentivizedPacketsForChannel implements the IncentivizedPacketsForChannel gRPC method
// IncentivizedPacketsForChannel implements the Query/IncentivizedPacketsForChannel gRPC method
func (k Keeper) IncentivizedPacketsForChannel(goCtx context.Context, req *types.QueryIncentivizedPacketsForChannelRequest) (*types.QueryIncentivizedPacketsForChannelResponse, error) {
if req == nil {
return nil, status.Error(codes.InvalidArgument, "empty request")
Expand Down

0 comments on commit 8451c63

Please sign in to comment.