Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
howydev committed Jun 27, 2024
1 parent 090b64f commit adb3a0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/account/UpgradeableModularAccount.sol
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ contract UpgradeableModularAccount is
FunctionReference userOpValidationFunction = FunctionReference.wrap(bytes21(userOp.signature[:21]));

// remove first 4 bytes which is executeUserOp.selector
PackedUserOperation memory uo;
PackedUserOperation memory uo = userOp;
bytes memory callData = uo.callData;
assembly {
let len := mload(callData)
Expand Down
8 changes: 4 additions & 4 deletions test/plugin/NativeTokenLimitPlugin.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ contract NativeTokenLimitPluginTest is OptimizedTest {
function test_userOp_combinedExecLimit_success() public {
assertEq(plugin.limits(address(acct), 0), 10 ether);
PackedUserOperation[] memory uos = new PackedUserOperation[](1);
uos[0] = _getPackedUO(100000, 100000, 100000, 1, _getExecuteWithValue(5 ether));
uos[0] = _getPackedUO(200000, 200000, 200000, 1, _getExecuteWithValue(5 ether));
entryPoint.handleOps(uos, bundler);

assertEq(plugin.limits(address(acct), 0), 5 ether - 300000);
assertEq(plugin.limits(address(acct), 0), 5 ether - 600000);
assertEq(recipient.balance, 5 ether);
}

Expand All @@ -175,10 +175,10 @@ contract NativeTokenLimitPluginTest is OptimizedTest {
function test_userOp_combinedExecLimit_failExec() public {
assertEq(plugin.limits(address(acct), 0), 10 ether);
PackedUserOperation[] memory uos = new PackedUserOperation[](1);
uos[0] = _getPackedUO(100000, 100000, 100000, 1, _getExecuteWithValue(10 ether));
uos[0] = _getPackedUO(200000, 200000, 200000, 1, _getExecuteWithValue(10 ether));
entryPoint.handleOps(uos, bundler);

assertEq(plugin.limits(address(acct), 0), 10 ether - 300000);
assertEq(plugin.limits(address(acct), 0), 10 ether - 600000);
assertEq(recipient.balance, 0);
}

Expand Down

0 comments on commit adb3a0c

Please sign in to comment.