Skip to content

Commit e76a976

Browse files
authored
nit: remove unecessary wrapping of acknowledgment error in recv packet callback. (#6846)
1 parent d14f550 commit e76a976

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

modules/apps/transfer/ibc_module.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ func (im IBCModule) OnRecvPacket(
199199

200200
data, ackErr = im.getICS20PacketData(ctx, packet.GetData(), packet.GetDestPort(), packet.GetDestChannel())
201201
if ackErr != nil {
202-
ackErr = errorsmod.Wrapf(ibcerrors.ErrInvalidType, ackErr.Error())
203202
ack = channeltypes.NewErrorAcknowledgement(ackErr)
204203
im.keeper.Logger(ctx).Error(fmt.Sprintf("%s sequence %d", ackErr.Error(), packet.Sequence))
205204
return ack

modules/apps/transfer/ibc_module_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,11 +334,11 @@ func (suite *TransferTestSuite) TestOnRecvPacket() {
334334
sdk.NewAttribute(types.AttributeKeyMemo, ""),
335335
sdk.NewAttribute(types.AttributeKeyForwardingHops, "null"),
336336
sdk.NewAttribute(types.AttributeKeyAckSuccess, "false"),
337-
sdk.NewAttribute(types.AttributeKeyAckError, "cannot unmarshal ICS20-V2 transfer packet data: errUnknownField \"*types.FungibleTokenPacketDataV2\": {TagNum: 13, WireType:\"fixed64\"}: invalid type: invalid type"),
337+
sdk.NewAttribute(types.AttributeKeyAckError, "cannot unmarshal ICS20-V2 transfer packet data: errUnknownField \"*types.FungibleTokenPacketDataV2\": {TagNum: 13, WireType:\"fixed64\"}: invalid type"),
338338
}
339339
},
340340
channeltypes.NewErrorAcknowledgement(ibcerrors.ErrInvalidType),
341-
"cannot unmarshal ICS20-V2 transfer packet data: unexpected EOF: invalid type: invalid type",
341+
"cannot unmarshal ICS20-V2 transfer packet data: unexpected EOF: invalid type",
342342
},
343343
{
344344
"failure: receive disabled",

0 commit comments

Comments
 (0)