From 3ed406997ffd1bc82771c7f370838c67376f90d2 Mon Sep 17 00:00:00 2001 From: seanmike <284936cj@gmail.com> Date: Wed, 1 Apr 2026 17:20:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=A4=9A=E6=AC=A1?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E5=80=BC=E8=A6=86=E7=9B=96=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lesson-3/FundMe.sol | 2 +- lesson-3/FundMe_flattened.sol | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lesson-3/FundMe.sol b/lesson-3/FundMe.sol index 9f9c0c5..da8f0e4 100644 --- a/lesson-3/FundMe.sol +++ b/lesson-3/FundMe.sol @@ -37,7 +37,7 @@ contract FundMe { function fund() external payable { require(convertEthToUsd(msg.value) >= MINIMUM_VALUE, "Send more ETH"); require(block.timestamp < deploymentTimestamp + lockTime, "window is closed"); - fundersToAmount[msg.sender] = msg.value; + fundersToAmount[msg.sender] += msg.value; } function getChainlinkDataFeedLatestAnswer() public view returns (int) { diff --git a/lesson-3/FundMe_flattened.sol b/lesson-3/FundMe_flattened.sol index 105445b..65e09e0 100644 --- a/lesson-3/FundMe_flattened.sol +++ b/lesson-3/FundMe_flattened.sol @@ -61,7 +61,7 @@ contract FundMe { function fund() external payable { require(convertEthToUsd(msg.value) >= MINIMUM_VALUE, "Send more ETH"); require(block.timestamp < deploymentTimestamp + lockTime, "window is closed"); - fundersToAmount[msg.sender] = msg.value; + fundersToAmount[msg.sender] += msg.value; } function getChainlinkDataFeedLatestAnswer() public view returns (int) {