From d291a73f76431ca9866e713b2ca3b23de46e588b Mon Sep 17 00:00:00 2001 From: Michael Montour Date: Sun, 19 May 2024 22:40:41 -0700 Subject: [PATCH] Add a test condition which doesn't call HC. Changes to be committed: modified: contracts/test/TestCounter.sol --- contracts/test/TestCounter.sol | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contracts/test/TestCounter.sol b/contracts/test/TestCounter.sol index 2fbf783..c42b89a 100644 --- a/contracts/test/TestCounter.sol +++ b/contracts/test/TestCounter.sol @@ -23,7 +23,10 @@ contract TestCounter { HybridAccount HA = HybridAccount(payable(ha_addr)); uint256 x; uint256 y; - + if (b == 0) { + counters[msg.sender] = counters[msg.sender] + a; + return; + } bytes memory req = abi.encodeWithSignature("addsub2(uint32,uint32)", a, b); bytes32 userKey = bytes32(abi.encode(msg.sender)); (uint32 error, bytes memory ret) = HA.CallOffchain(userKey, req);