Skip to content

Fixed typos #23598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ Off-chain is a `client/v2` package providing functionalities for allowing to sig
* `sign-file` for signing a file.
* `verify-file` for verifying a previously signed file.

Signing a file will result in a Tx with a `MsgSignArbitraryData` as described in the [Off-chain CIP](https://github.com/cosmos/cips/blob/main/cips/cip-X.md).
Signing a file will result in a Tx with a `MsgSignArbitraryData` as described in the [Off-chain CIP](https://github.com/cosmos/chips/blob/main/chips/cip-X.md).

## Sign a file

Expand Down
2 changes: 1 addition & 1 deletion docs/rfc/rfc-004-accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ management system that is better suited to address the requirements of the Cosmo

#### Standardization

With `x/accounts` allowing a modular api there becomes a need for standardization of accounts or the interfaces wallets and other clients should expect to use. For this reason we will be using the [`CIP` repo](https://github.com/cosmos/cips) in order to standardize interfaces in order for wallets to know what to expect when interacting with accounts.
With `x/accounts` allowing a modular api there becomes a need for standardization of accounts or the interfaces wallets and other clients should expect to use. For this reason we will be using the [`CIP` repo](https://github.com/cosmos/chips) in order to standardize interfaces in order for wallets to know what to expect when interacting with accounts.

## Implementation

Expand Down
20 changes: 10 additions & 10 deletions tests/integration/v2/distribution/grpc_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func TestGRPCValidatorSlashes(t *testing.T) {

var (
req *types.QueryValidatorSlashesRequest
expRes *types.QueryValidatorSlashesResponse
express *types.QueryValidatorSlashesResponse
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Revert variable name change from expRes to express.

The variable name change from expRes to express appears to be a misstep. expRes is a common abbreviation for "expected result" in test files, while express doesn't convey the same meaning and could be misleading.

Apply this diff to revert the variable name:

-express := &types.QueryValidatorSlashesResponse{
+expRes := &types.QueryValidatorSlashesResponse{
-express = &types.QueryValidatorSlashesResponse{}
+expRes = &types.QueryValidatorSlashesResponse{}
-express = &types.QueryValidatorSlashesResponse{Pagination: &query.PageResponse{}}
+expRes = &types.QueryValidatorSlashesResponse{Pagination: &query.PageResponse{}}
-express = &types.QueryValidatorSlashesResponse{Pagination: &query.PageResponse{}}
+expRes = &types.QueryValidatorSlashesResponse{Pagination: &query.PageResponse{}}
-express = &types.QueryValidatorSlashesResponse{
+expRes = &types.QueryValidatorSlashesResponse{
-express = &types.QueryValidatorSlashesResponse{
+expRes = &types.QueryValidatorSlashesResponse{
-express = &types.QueryValidatorSlashesResponse{
+expRes = &types.QueryValidatorSlashesResponse{
-express := &types.QueryDelegationRewardsResponse{
+expRes := &types.QueryDelegationRewardsResponse{
-assert.DeepEqual(t, express, rewards)
+assert.DeepEqual(t, expRes, rewards)

Also applies to: 223-223, 236-236, 249-249, 268-268, 289-289, 310-310, 470-470, 531-531

)

testCases := []struct {
Expand All @@ -220,7 +220,7 @@ func TestGRPCValidatorSlashes(t *testing.T) {
name: "empty request",
malleate: func() {
req = &types.QueryValidatorSlashesRequest{}
expRes = &types.QueryValidatorSlashesResponse{}
express = &types.QueryValidatorSlashesResponse{}
},
expPass: false,
expErrMsg: "empty validator address",
Expand All @@ -233,7 +233,7 @@ func TestGRPCValidatorSlashes(t *testing.T) {
StartingHeight: 10,
EndingHeight: 1,
}
expRes = &types.QueryValidatorSlashesResponse{Pagination: &query.PageResponse{}}
express = &types.QueryValidatorSlashesResponse{Pagination: &query.PageResponse{}}
},
expPass: false,
expErrMsg: "starting height greater than ending height",
Expand All @@ -246,7 +246,7 @@ func TestGRPCValidatorSlashes(t *testing.T) {
StartingHeight: 1,
EndingHeight: 10,
}
expRes = &types.QueryValidatorSlashesResponse{Pagination: &query.PageResponse{}}
express = &types.QueryValidatorSlashesResponse{Pagination: &query.PageResponse{}}
},
expPass: true,
},
Expand All @@ -265,7 +265,7 @@ func TestGRPCValidatorSlashes(t *testing.T) {
Pagination: pageReq,
}

expRes = &types.QueryValidatorSlashesResponse{
express = &types.QueryValidatorSlashesResponse{
Slashes: slashes[2:],
}
},
Expand All @@ -286,7 +286,7 @@ func TestGRPCValidatorSlashes(t *testing.T) {
Pagination: pageReq,
}

expRes = &types.QueryValidatorSlashesResponse{
express = &types.QueryValidatorSlashesResponse{
Slashes: slashes[:3],
}
},
Expand All @@ -307,7 +307,7 @@ func TestGRPCValidatorSlashes(t *testing.T) {
Pagination: pageReq,
}

expRes = &types.QueryValidatorSlashesResponse{
express = &types.QueryValidatorSlashesResponse{
Slashes: slashes[:4],
}
},
Expand All @@ -324,7 +324,7 @@ func TestGRPCValidatorSlashes(t *testing.T) {

if tc.expPass {
assert.NilError(t, err)
assert.DeepEqual(t, expRes.GetSlashes(), slashesRes.GetSlashes())
assert.DeepEqual(t, express.GetSlashes(), slashesRes.GetSlashes())
} else {
assert.ErrorContains(t, err, tc.expErrMsg)
assert.Assert(t, slashesRes == nil)
Expand Down Expand Up @@ -467,7 +467,7 @@ func TestGRPCDelegationRewards(t *testing.T) {
assert.NilError(t, f.distrKeeper.ValidatorCurrentRewards.Set(f.ctx, f.valAddr, currentRewards))
assert.NilError(t, f.distrKeeper.ValidatorOutstandingRewards.Set(f.ctx, f.valAddr, types.ValidatorOutstandingRewards{Rewards: decCoins}))

expRes := &types.QueryDelegationRewardsResponse{
express := &types.QueryDelegationRewardsResponse{
Rewards: sdk.DecCoins{sdk.DecCoin{Denom: sdk.DefaultBondDenom, Amount: math.LegacyNewDec(initialStake / 10)}},
}

Expand Down Expand Up @@ -528,7 +528,7 @@ func TestGRPCDelegationRewards(t *testing.T) {

if tc.expPass {
assert.NilError(t, err)
assert.DeepEqual(t, expRes, rewards)
assert.DeepEqual(t, express, rewards)
} else {
assert.ErrorContains(t, err, tc.expErrMsg)
assert.Assert(t, rewards == nil)
Expand Down
Loading