Skip to content

Commit ae1a564

Browse files
authored
Use any force-sent ETH as deposits (#17)
1 parent 97bc750 commit ae1a564

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Paymaster.sol

+2-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ contract Paymaster is BasePaymaster {
9898
}
9999

100100
receive() external payable {
101-
(bool callSuccess, ) = payable(address(entryPoint)).call{value: msg.value}("");
101+
// use address(this).balance rather than msg.value in case of force-send
102+
(bool callSuccess, ) = payable(address(entryPoint)).call{value: address(this).balance}("");
102103
require(callSuccess, "Deposit failed");
103104
}
104105
}

0 commit comments

Comments
 (0)