Skip to content

Commit

Permalink
Problem: no easy way to detect error ack packet
Browse files Browse the repository at this point in the history
check underlying_app_success
  • Loading branch information
mmsqe committed Oct 9, 2024
1 parent fb902d2 commit de587a8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions x/cronos/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,9 @@ func (k Keeper) IBCOnAcknowledgementPacketCallback(
if err := k.cdc.UnmarshalJSON(acknowledgement, &ack); err != nil {
return err
}
if !ack.UnderlyingAppSuccess {
return k.onPacketResult(ctx, packet, false, relayer, contractAddress, packetSenderAddress)

Check warning on line 321 in x/cronos/keeper/keeper.go

View check run for this annotation

Codecov / codecov/patch

x/cronos/keeper/keeper.go#L320-L321

Added lines #L320 - L321 were not covered by tests
}
var res channeltypes.Acknowledgement
if err := k.cdc.UnmarshalJSON(ack.AppAcknowledgement, &res); err != nil {
return err
Expand Down

0 comments on commit de587a8

Please sign in to comment.