From 501b47984f8e397d057c1db1fccb92d1b5b548d3 Mon Sep 17 00:00:00 2001 From: Luis Alfredo Lorenzo <108485808+luis-immunefi@users.noreply.github.com> Date: Fri, 28 Nov 2025 08:59:52 -0600 Subject: [PATCH] Fix withdrawal logic in EtherStore contract --- src/EtherStore.sol | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/EtherStore.sol b/src/EtherStore.sol index 1fa2da6..f865092 100644 --- a/src/EtherStore.sol +++ b/src/EtherStore.sol @@ -12,9 +12,16 @@ contract EtherStore { uint256 bal = balances[msg.sender]; require(bal >= 0); + + + (bool sent,) = msg.sender.call{value: bal}(""); require(sent, "Failed to send Ether"); + + + + balances[msg.sender] = 0; }