Skip to content

Commit

Permalink
remove overwriting the same value to alternativeCreditsPerToken
Browse files Browse the repository at this point in the history
  • Loading branch information
sparrowDom committed Nov 15, 2024
1 parent 31c8078 commit 511dcaa
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions contracts/contracts/token/OUSD.sol
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ contract OUSD is Governable {

_creditBalances[account] = newBalance;
_creditBalances[target] = targetNewCredits;
alternativeCreditsPerToken[account] = 1e18;
} else if (state == RebaseOptions.YieldDelegationTarget) {
uint256 newCredits = _balanceToRebasingCredits(
newBalance + _creditBalances[yieldFrom[account]]
Expand Down Expand Up @@ -694,9 +693,7 @@ contract OUSD is Governable {

// Local
_creditBalances[from] = fromBalance;
alternativeCreditsPerToken[from] = 1e18;
_creditBalances[to] = toNewCredits;
alternativeCreditsPerToken[to] = 0; // Is needed otherwise rebaseOptOut check will not pass

// Global
nonRebasingSupply += fromBalance;
Expand Down

0 comments on commit 511dcaa

Please sign in to comment.