Skip to content

Commit

Permalink
fix: Missed btc_delegations -> btc_delegator_delegations (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitsalis authored Aug 4, 2023
1 parent 3ce700f commit 2099738
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 74 deletions.
4 changes: 2 additions & 2 deletions proto/babylon/btcstaking/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ message QueryBTCValidatorDelegationsRequest {
// QueryBTCValidatorDelegationsResponse is the response type for the
// Query/BTCValidatorDelegations RPC method.
message QueryBTCValidatorDelegationsResponse {
// btc_delegations contains all the queried BTC delegations.
repeated BTCDelegatorDelegations btc_delegations = 1;
// btc_delegator_delegations contains all the queried BTC delegations.
repeated BTCDelegatorDelegations btc_delegator_delegations = 1;

// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/configurer/chain/queries_btcstaking.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (n *NodeConfig) QueryBTCValidatorDelegations(valBTCPK string) []*bstypes.BT
err = util.Cdc.UnmarshalJSON(bz, &resp)
require.NoError(n.t, err)

return resp.BtcDelegations
return resp.BtcDelegatorDelegations
}

func (n *NodeConfig) QueryActivatedHeight() uint64 {
Expand Down
2 changes: 1 addition & 1 deletion x/btcstaking/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,5 +190,5 @@ func (k Keeper) BTCValidatorDelegations(ctx context.Context, req *types.QueryBTC
return nil, err
}

return &types.QueryBTCValidatorDelegationsResponse{BtcDelegations: btcDels, Pagination: pageRes}, nil
return &types.QueryBTCValidatorDelegationsResponse{BtcDelegatorDelegations: btcDels, Pagination: pageRes}, nil
}
2 changes: 1 addition & 1 deletion x/btcstaking/keeper/grpc_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ func FuzzBTCValidatorDelegations(f *testing.F) {
resp, err = keeper.BTCValidatorDelegations(ctx, &req)
require.NoError(t, err)
require.NotNil(t, resp)
for _, btcDels := range resp.BtcDelegations {
for _, btcDels := range resp.BtcDelegatorDelegations {
require.Len(t, btcDels.Dels, 1)
btcDel := btcDels.Dels[0]
require.Equal(t, btcVal.BtcPk, btcDel.ValBtcPk)
Expand Down
2 changes: 1 addition & 1 deletion x/btcstaking/types/btcstaking.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

137 changes: 69 additions & 68 deletions x/btcstaking/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2099738

Please sign in to comment.