From 9aa6bc94586d13a814da2612adff4a99b58a7fcb Mon Sep 17 00:00:00 2001 From: Domen Grabec Date: Thu, 5 Dec 2024 02:03:03 +0100 Subject: [PATCH] gas optimisation --- contracts/contracts/token/OUSD.sol | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contracts/contracts/token/OUSD.sol b/contracts/contracts/token/OUSD.sol index 8bd07380bf..295b34053a 100644 --- a/contracts/contracts/token/OUSD.sol +++ b/contracts/contracts/token/OUSD.sol @@ -392,8 +392,9 @@ contract OUSD is Governable { view returns (uint256) { - if (alternativeCreditsPerToken[_account] != 0) { - return alternativeCreditsPerToken[_account]; + uint256 alternativeCreditsPerTokenMem = alternativeCreditsPerToken[_account]; + if (alternativeCreditsPerTokenMem != 0) { + return alternativeCreditsPerTokenMem; } else { return rebasingCreditsPerToken_; }