Skip to content

Commit

Permalink
fix lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
pythonberg1997 committed Jan 30, 2024
1 parent a72cba1 commit 2a1bd19
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions contracts/BC_fusion/StakeHub.sol
Original file line number Diff line number Diff line change
Expand Up @@ -788,12 +788,16 @@ contract StakeHub is System, Initializable {
} else if (key.compareStrings("minSelfDelegationBNB")) {
if (value.length != 32) revert InvalidValue(key, value);
uint256 newMinSelfDelegationBNB = value.bytesToUint256(32);
if (newMinSelfDelegationBNB < 1000 ether || newMinSelfDelegationBNB > 100_000 ether) revert InvalidValue(key, value);
if (newMinSelfDelegationBNB < 1000 ether || newMinSelfDelegationBNB > 100_000 ether) {
revert InvalidValue(key, value);
}
minSelfDelegationBNB = newMinSelfDelegationBNB;
} else if (key.compareStrings("minDelegationBNBChange")) {
if (value.length != 32) revert InvalidValue(key, value);
uint256 newMinDelegationBNBChange = value.bytesToUint256(32);
if (newMinDelegationBNBChange < 0.1 ether || newMinDelegationBNBChange > 10 ether) revert InvalidValue(key, value);
if (newMinDelegationBNBChange < 0.1 ether || newMinDelegationBNBChange > 10 ether) {
revert InvalidValue(key, value);
}
minDelegationBNBChange = newMinDelegationBNBChange;
} else if (key.compareStrings("maxElectedValidators")) {
if (value.length != 32) revert InvalidValue(key, value);
Expand Down

0 comments on commit 2a1bd19

Please sign in to comment.