The divideNft function has redundant usage of the onlyNftOwner modifier, which is applied twice on the same function. This duplication does not provide any additional functionality and may confuse developers or auditors.
The function divideNft applies the onlyNftOwner modifier twice on the same function signature: Modifiers are designed to enforce conditions before the function executes.
While not a major concern in this case, adding unnecessary modifier calls increases the overall complexity of the contract, which may result in slightly higher gas consumption than necessary.
Manual Review / Slither
Remove Duplicate Modifier: To fix the issue, remove one of the onlyNftOwner(nftAddress, tokenId) modifiers from the function. The modifier is only needed once to ensure that the caller is the owner of the NFT.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.