Skip to content

Commit

Permalink
fix: address comparision in tokenFallback (#856)
Browse files Browse the repository at this point in the history
* fix: acknowledgement compare issue fixed

* fix: address comparision in tokenFallback
  • Loading branch information
gcranju authored Apr 5, 2024
1 parent 8dbb6ab commit d0c0933
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ public void tokenFallback(Address from, BigInteger value, byte[] _data) {

Context.require(amount.equals(value), TAG + " : Mismatched amount");
Context.require(sender.equals(from.toString()), TAG + " : Sender address mismatched");
Context.require(tokenContracts.get(denomination) == Context.getCaller(),

Address tokenAddress = tokenContracts.get(denomination);

Context.require(tokenAddress!=null && tokenAddress.equals(Context.getCaller()),
TAG + " : Sender Token Contract not registered");

sendFungibleToken(denomination, amount, sender, receiver, sourcePort, sourceChannel, height,
Expand Down

0 comments on commit d0c0933

Please sign in to comment.