From 49c32ddec492f54c3d51ccdf69486bb7a45961fb Mon Sep 17 00:00:00 2001 From: Duong NV Date: Tue, 10 Dec 2024 17:19:44 +0700 Subject: [PATCH] Clean up: linting, formatting, and spelling corrections (#7655) * clean * Update modules/core/23-commitment/types/merkle_test.go --------- Co-authored-by: DimitrisJim --- modules/apps/transfer/client/cli/tx.go | 2 +- modules/apps/transfer/keeper/msg_server.go | 2 +- modules/apps/transfer/types/transfer.pb.go | 2 +- modules/core/02-client/types/height.go | 2 +- proto/ibc/applications/transfer/v1/transfer.proto | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/apps/transfer/client/cli/tx.go b/modules/apps/transfer/client/cli/tx.go index 2e80f249f88..4850019c841 100644 --- a/modules/apps/transfer/client/cli/tx.go +++ b/modules/apps/transfer/client/cli/tx.go @@ -45,7 +45,7 @@ Note, relative timeout height is not supported. Relative timeout timestamp is ad using the {packet-timeout-timestamp} flag. If no timeout value is set then a default relative timeout value of 10 minutes is used. IBC tokens can be automatically unwound to their native chain using the {unwind} flag. Please note that if the {unwind} flag is used, then all coins must be IBC vouchers and share exactly the same denomination trace path, and the src-port and src-channel arguments must not be specified. Tokens can also be -automatically forwarded through multiple chains using the {fowarding} flag and specifying a comma-separated list of source portID/channelID pairs for +automatically forwarded through multiple chains using the {forwarding} flag and specifying a comma-separated list of source portID/channelID pairs for each intermediary chain. {unwind} and {forwarding} flags can be used together to first unwind IBC tokens to their native chain and then forward them to the final destination.`), Example: fmt.Sprintf("%s tx ibc-transfer transfer [src-port] [src-channel] [receiver] [coins]", version.AppName), Args: cobra.RangeArgs(2, 4), diff --git a/modules/apps/transfer/keeper/msg_server.go b/modules/apps/transfer/keeper/msg_server.go index b0cb57398b7..fe40518de75 100644 --- a/modules/apps/transfer/keeper/msg_server.go +++ b/modules/apps/transfer/keeper/msg_server.go @@ -30,7 +30,7 @@ func (k Keeper) Transfer(goCtx context.Context, msg *types.MsgTransfer) (*types. coins := msg.GetCoins() if err := k.bankKeeper.IsSendEnabledCoins(ctx, coins...); err != nil { - return nil, errorsmod.Wrapf(types.ErrSendDisabled, err.Error()) + return nil, errorsmod.Wrap(types.ErrSendDisabled, err.Error()) } if k.isBlockedAddr(sender) { diff --git a/modules/apps/transfer/types/transfer.pb.go b/modules/apps/transfer/types/transfer.pb.go index 8e65d787930..8f5ed10b56f 100644 --- a/modules/apps/transfer/types/transfer.pb.go +++ b/modules/apps/transfer/types/transfer.pb.go @@ -87,7 +87,7 @@ func (m *Params) GetReceiveEnabled() bool { // through which a packet must be forwarded, and an unwind boolean indicating if // the coin should be unwinded to its native chain before forwarding. type Forwarding struct { - // optional unwinding for the token transfered + // optional unwinding for the token transferred Unwind bool `protobuf:"varint,1,opt,name=unwind,proto3" json:"unwind,omitempty"` // optional intermediate path through which packet will be forwarded Hops []Hop `protobuf:"bytes,2,rep,name=hops,proto3" json:"hops"` diff --git a/modules/core/02-client/types/height.go b/modules/core/02-client/types/height.go index c5d6839588a..82ce3a17a9c 100644 --- a/modules/core/02-client/types/height.go +++ b/modules/core/02-client/types/height.go @@ -162,7 +162,7 @@ func SetRevisionNumber(chainID string, revision uint64) (string, error) { splitStr := strings.Split(chainID, "-") // swap out revision number with given revision - splitStr[len(splitStr)-1] = strconv.Itoa(int(revision)) + splitStr[len(splitStr)-1] = strconv.FormatUint(revision, 10) return strings.Join(splitStr, "-"), nil } diff --git a/proto/ibc/applications/transfer/v1/transfer.proto b/proto/ibc/applications/transfer/v1/transfer.proto index 8ae82cb64d7..2c4ea710721 100644 --- a/proto/ibc/applications/transfer/v1/transfer.proto +++ b/proto/ibc/applications/transfer/v1/transfer.proto @@ -23,7 +23,7 @@ message Params { // through which a packet must be forwarded, and an unwind boolean indicating if // the coin should be unwinded to its native chain before forwarding. message Forwarding { - // optional unwinding for the token transfered + // optional unwinding for the token transferred bool unwind = 1; // optional intermediate path through which packet will be forwarded repeated Hop hops = 2 [(gogoproto.nullable) = false];