From 2dda481e3561e1e0945ea625888c51397dbf298e Mon Sep 17 00:00:00 2001 From: Christian Kakesa Date: Mon, 9 Sep 2024 11:54:57 +0200 Subject: [PATCH] reduce gas --- contracts/StableJoeStaking.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/StableJoeStaking.sol b/contracts/StableJoeStaking.sol index b09ba23..6f5e911 100644 --- a/contracts/StableJoeStaking.sol +++ b/contracts/StableJoeStaking.sol @@ -203,7 +203,7 @@ contract StableJoeStaking is Initializable, OwnableUpgradeable { * @return The reward debt for the chosen token */ function getUserInfo(address _user, IERC20Upgradeable _rewardToken) external view returns (uint256, uint256) { - UserInfo storage user = userInfo[_user]; + UserInfo memory user = userInfo[_user]; return (user.amount, user.rewardDebt[_rewardToken]); }