Skip to content

Commit 6b0bd37

Browse files
authored
chore: std error formatting in transfer handshake callbacks (#4163)
1 parent 551963e commit 6b0bd37

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/apps/transfer/ibc_module.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func (im IBCModule) OnChanOpenInit(
8383
}
8484

8585
if version != types.Version {
86-
return "", errorsmod.Wrapf(types.ErrInvalidVersion, "got %s, expected %s", version, types.Version)
86+
return "", errorsmod.Wrapf(types.ErrInvalidVersion, "expected %s, got %s", types.Version, version)
8787
}
8888

8989
// Claim channel capability passed back by IBC module
@@ -110,7 +110,7 @@ func (im IBCModule) OnChanOpenTry(
110110
}
111111

112112
if counterpartyVersion != types.Version {
113-
return "", errorsmod.Wrapf(types.ErrInvalidVersion, "invalid counterparty version: got: %s, expected %s", counterpartyVersion, types.Version)
113+
return "", errorsmod.Wrapf(types.ErrInvalidVersion, "invalid counterparty version: expected %s, got %s", types.Version, counterpartyVersion)
114114
}
115115

116116
// OpenTry must claim the channelCapability that IBC passes into the callback
@@ -130,7 +130,7 @@ func (im IBCModule) OnChanOpenAck(
130130
counterpartyVersion string,
131131
) error {
132132
if counterpartyVersion != types.Version {
133-
return errorsmod.Wrapf(types.ErrInvalidVersion, "invalid counterparty version: %s, expected %s", counterpartyVersion, types.Version)
133+
return errorsmod.Wrapf(types.ErrInvalidVersion, "invalid counterparty version: expected %s, got %s", types.Version, counterpartyVersion)
134134
}
135135
return nil
136136
}

0 commit comments

Comments
 (0)