Skip to content

Commit

Permalink
Merge pull request #580 from bnb-chain/develop
Browse files Browse the repository at this point in the history
fix: not set agentToOperator while newAgent is zero address (#579)
  • Loading branch information
cosinlink authored Jul 24, 2024
2 parents 04bc57c + f11346c commit 398c936
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contracts/BC_fusion/StakeHub.sol
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,10 @@ contract StakeHub is System, Initializable, Protectable {
}

_validators[operatorAddress].agent = newAgent;
agentToOperator[newAgent] = operatorAddress;

if (newAgent != address(0)) {
agentToOperator[newAgent] = operatorAddress;
}

emit AgentChanged(operatorAddress, oldAgent, newAgent);
}
Expand Down

0 comments on commit 398c936

Please sign in to comment.