From e632f3a5a5fd5b2fa155926fcfc560222ba9fa2c Mon Sep 17 00:00:00 2001 From: gcranju Date: Thu, 4 Apr 2024 12:01:01 +0545 Subject: [PATCH] fix: acknowledgement compare issue fixed --- .../javascore/ics20/src/main/java/ibc/ics20/ICS20Transfer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contracts/javascore/ics20/src/main/java/ibc/ics20/ICS20Transfer.java b/contracts/javascore/ics20/src/main/java/ibc/ics20/ICS20Transfer.java index 5363f34d1..6f520341c 100644 --- a/contracts/javascore/ics20/src/main/java/ibc/ics20/ICS20Transfer.java +++ b/contracts/javascore/ics20/src/main/java/ibc/ics20/ICS20Transfer.java @@ -16,6 +16,7 @@ import score.annotation.Optional; import score.annotation.Payable; import icon.ibc.interfaces.IIBCModule; +import java.util.Arrays; import java.math.BigInteger; @@ -332,7 +333,7 @@ public byte[] onRecvPacket(byte[] packet, Address relayer) { @External public void onAcknowledgementPacket(byte[] packet, byte[] acknowledgement, Address relayer) { onlyIBC(); - if (!acknowledgement.equals(ICS20Lib.SUCCESSFUL_ACKNOWLEDGEMENT_JSON)) { + if (!Arrays.equals(acknowledgement,ICS20Lib.SUCCESSFUL_ACKNOWLEDGEMENT_JSON)) { Packet packetDb = Packet.decode(packet); refundTokens(packetDb); }