Make Votes.sol _makeDelegateVotes internal (#5007)

This commit is contained in:
Ernesto García
2024-04-08 15:25:47 -06:00
committed by GitHub
parent df78791c96
commit 427b8bb028
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': minor
---
`Votes`: Set `_moveDelegateVotes` visibility to internal instead of private.

View File

@ -190,7 +190,7 @@ abstract contract Votes is Context, EIP712, Nonces, IERC5805 {
/** /**
* @dev Moves delegated votes from one delegate to another. * @dev Moves delegated votes from one delegate to another.
*/ */
function _moveDelegateVotes(address from, address to, uint256 amount) private { function _moveDelegateVotes(address from, address to, uint256 amount) internal virtual {
if (from != to && amount > 0) { if (from != to && amount > 0) {
if (from != address(0)) { if (from != address(0)) {
(uint256 oldValue, uint256 newValue) = _push( (uint256 oldValue, uint256 newValue) = _push(