Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(account-update.ts): simplify isParentsOwnToken and remove ch…
…eck for inheritFromParent flag The isParentsOwnToken method was checking that inheritFromParent is not true when validating if an account update is for a parent's own token. However, this check is unnecessary as the two flags are mutually exclusive and should not both be true at the same time. The check method was ensuring this invariant. By removing the inheritFromParent check from isParentsOwnToken and the entire check method, we simplify the code while still maintaining the intended behavior. The isParentsOwnToken method now only returns the value of the parentsOwnToken flag, and the isInheritFromParent method continues to return the value of the inheritFromParent flag. This refactoring improves code readability and maintainability by removing redundant checks and simplifying the logic.
- Loading branch information