Skip to content

Commit 9342804

Browse files
committed
Simplify transfer success test
1 parent 0686453 commit 9342804

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

x/wasm/ibc.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
package wasm
22

33
import (
4-
"encoding/json"
54
"math"
6-
"slices"
75

86
wasmvmtypes "github.com/CosmWasm/wasmvm/v3/types"
97
transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
@@ -418,14 +416,11 @@ func (i IBCHandler) IBCReceivePacketCallback(
418416

419417
var transfer *wasmvmtypes.IBCTransferCallback
420418

421-
var parsedAck channeltypes.Acknowledgement_Result
422-
err = json.Unmarshal(ack.Acknowledgement(), &parsedAck)
423-
424419
// detect successful IBC transfer, meaning:
425420
// 1. it was sent to the transfer module
426421
// 2. the acknowledgement was successful
427422
if packet.GetDestPort() == i.transferKeeper.GetPort(cachedCtx) &&
428-
ack.Success() && err == nil && slices.Equal(parsedAck.Result, []byte{1}) {
423+
ack.Success() && err == nil {
429424

430425
transferData, err := transfertypes.UnmarshalPacketData(packet.GetData(), version, "")
431426
if err != nil {

0 commit comments

Comments
 (0)