From 403377fe534717f928ffb122ec999b1674e85126 Mon Sep 17 00:00:00 2001 From: strmfos <155266597+strmfos@users.noreply.github.com> Date: Thu, 31 Jul 2025 16:34:55 +0200 Subject: [PATCH] docs: fix typos in comments / code (#25059) Co-authored-by: Alex | Interchain Labs --- x/tx/signing/context.go | 2 +- x/tx/signing/context_test.go | 2 +- x/tx/signing/textual/timestamp_test.go | 2 +- x/tx/signing/textual/tx.go | 2 +- x/tx/signing/textual/tx_test.go | 2 +- x/upgrade/abci_test.go | 2 +- x/upgrade/keeper/keeper.go | 2 +- x/upgrade/types/handler.go | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/x/tx/signing/context.go b/x/tx/signing/context.go index beda583c2c..5ff351ddb0 100644 --- a/x/tx/signing/context.go +++ b/x/tx/signing/context.go @@ -159,7 +159,7 @@ func (c *Context) Validate() error { md := sd.Methods().Get(j).Input() _, hasCustomSigner := c.customGetSignerFuncs[md.FullName()] if _, err := getSignersFieldNames(md); err == nil && hasCustomSigner { - errs = append(errs, fmt.Errorf("a custom signer function as been defined for message %s which already has a signer field defined with (cosmos.msg.v1.signer)", md.FullName())) + errs = append(errs, fmt.Errorf("a custom signer function has been defined for message %s which already has a signer field defined with (cosmos.msg.v1.signer)", md.FullName())) continue } _, err := c.getGetSignersFn(md) diff --git a/x/tx/signing/context_test.go b/x/tx/signing/context_test.go index feb5c0bdc6..e17e61372c 100644 --- a/x/tx/signing/context_test.go +++ b/x/tx/signing/context_test.go @@ -288,7 +288,7 @@ func TestDefineCustomGetSigners(t *testing.T) { }) context, err = NewContext(options) require.NoError(t, err) - require.ErrorContains(t, context.Validate(), "a custom signer function as been defined for message SimpleSigner") + require.ErrorContains(t, context.Validate(), "a custom signer function has been defined for message SimpleSigner") } type dummyAddressCodec struct{} diff --git a/x/tx/signing/textual/timestamp_test.go b/x/tx/signing/textual/timestamp_test.go index 65d2a99a93..c16e988de4 100644 --- a/x/tx/signing/textual/timestamp_test.go +++ b/x/tx/signing/textual/timestamp_test.go @@ -39,7 +39,7 @@ func TestTimestampJSONTestcasesTestData(t *testing.T) { // Tests to ensure that we compare standardized forms of the final timestamppb.Timestamp. // Please see issue https://github.com/cosmos/cosmos-sdk/issues/15761 func TestTimestampJsonTestcasesExtraneousNanos(t *testing.T) { - testTimestampJSONTestcases(t, []byte(`[{"proto":{"nAnos":1000000000},"text":"1970-01-01T00:00:01Z"}]`)) + testTimestampJSONTestcases(t, []byte(`[{"proto":{"nanos":1000000000},"text":"1970-01-01T00:00:01Z"}]`)) } func testTimestampJSONTestcases(t *testing.T, raw []byte) { diff --git a/x/tx/signing/textual/tx.go b/x/tx/signing/textual/tx.go index f49012870d..73b651026f 100644 --- a/x/tx/signing/textual/tx.go +++ b/x/tx/signing/textual/tx.go @@ -204,7 +204,7 @@ func (vr txValueRenderer) Parse(ctx context.Context, screens []Screen) (protoref for i := range screens { parsable[i+1].Indent = screens[i].Indent + 1 - // Take same text, except that we weplace: + // Take same text, except that we replace: // "This transaction has Message" // with: // "Message: Any" diff --git a/x/tx/signing/textual/tx_test.go b/x/tx/signing/textual/tx_test.go index 47acb0a8be..b606e5d741 100644 --- a/x/tx/signing/textual/tx_test.go +++ b/x/tx/signing/textual/tx_test.go @@ -114,7 +114,7 @@ func TestTxJSONTestcases(t *testing.T) { } } -// createTextualData creates a Textual data give then JSON +// createTextualData creates a Textual data given the JSON // test case. func createTextualData(t *testing.T, jsonTx txJSONTestTx, jsonSignerData json.RawMessage) (*txv1beta1.TxBody, []byte, *txv1beta1.AuthInfo, []byte, signing.SignerData) { t.Helper() diff --git a/x/upgrade/abci_test.go b/x/upgrade/abci_test.go index f3ff82fa62..86fc577aba 100644 --- a/x/upgrade/abci_test.go +++ b/x/upgrade/abci_test.go @@ -375,7 +375,7 @@ func TestDumpUpgradeInfoToFile(t *testing.T) { upgradeInfo, err := s.keeper.ReadUpgradeInfoFromDisk() require.NoError(t, err) - t.Log("Verify upgrade height from file matches ") + t.Log("Verify upgrade height from file matches") require.Equal(t, upgradeInfo.Height, planHeight) require.Equal(t, upgradeInfo.Name, plan.Name) diff --git a/x/upgrade/keeper/keeper.go b/x/upgrade/keeper/keeper.go index 5a4e82df62..c9dfe7141f 100644 --- a/x/upgrade/keeper/keeper.go +++ b/x/upgrade/keeper/keeper.go @@ -33,7 +33,7 @@ import ( // UpgradeInfoFileName file to store upgrade information // use x/upgrade/types.UpgradeInfoFilename instead. // -// Deprecated:will be removed in the future. +// Deprecated: will be removed in the future. const UpgradeInfoFileName string = "upgrade-info.json" type Keeper struct { diff --git a/x/upgrade/types/handler.go b/x/upgrade/types/handler.go index 80d57da469..0009ef0bdc 100644 --- a/x/upgrade/types/handler.go +++ b/x/upgrade/types/handler.go @@ -9,7 +9,7 @@ import ( // UpgradeHandler specifies the type of function that is called when an upgrade // is applied. // -// `fromVM` is a VersionMap of moduleName to fromVersion (unit64), where +// `fromVM` is a VersionMap of moduleName to fromVersion (uint64), where // fromVersion denotes the version from which we should migrate the module, the // target version being the module's latest version in the return VersionMap, // let's call it `toVM`.