From 2c26cf72ec350210457726900f546d568c28530e Mon Sep 17 00:00:00 2001 From: Pablo Maldonado Date: Fri, 17 Nov 2023 11:45:03 +0100 Subject: [PATCH] feat: storage Signed-off-by: Pablo Maldonado --- src/HoneyPot.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HoneyPot.sol b/src/HoneyPot.sol index 5354eb7..77cbde7 100644 --- a/src/HoneyPot.sol +++ b/src/HoneyPot.sol @@ -53,7 +53,7 @@ contract HoneyPot is Ownable { (, int256 currentPrice,,,) = oracle.latestRoundData(); require(currentPrice >= 0, "Invalid price from oracle"); - HoneyPotDetails memory userPot = honeyPots[honeyPotCreator]; + HoneyPotDetails storage userPot = honeyPots[honeyPotCreator]; require(currentPrice != userPot.liquidationPrice, "Liquidation price reached for this user"); require(userPot.balance > 0, "No balance to withdraw");