Skip to content

Commit

Permalink
Add a test condition which doesn't call HC.
Browse files Browse the repository at this point in the history
 Changes to be committed:
	modified:   contracts/test/TestCounter.sol
  • Loading branch information
mmontour1306 committed May 20, 2024
1 parent 35c556c commit d291a73
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contracts/test/TestCounter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d291a73

Please sign in to comment.