refactor(management-tabs): simpler checking util funcs

This commit is contained in:
RadoslavDimchev 2024-04-10 00:15:30 +03:00 committed by Emil Ivanichkov
parent 8d0bc1af34
commit e073990a72
1 changed files with 3 additions and 10 deletions

View File

@ -20,16 +20,9 @@ export type Validator = {
status: string status: string
} }
const isValidStatus = (validatorStatus: string, tabStatus: string) => { const isValidStatus = (validatorStatus: string, tabStatus: string) =>
if ( validatorStatus === tabStatus ||
validatorStatus === tabStatus || tabStatus === VALIDATOR_TABS_MANAGEMENT[VALIDATOR_TABS_MANAGEMENT.length - 1]
tabStatus ===
VALIDATOR_TABS_MANAGEMENT[VALIDATOR_TABS_MANAGEMENT.length - 1]
) {
return true
}
return false
}
const isValidNameOrAddress = ( const isValidNameOrAddress = (
validatorName: string, validatorName: string,