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
}
const isValidStatus = (validatorStatus: string, tabStatus: string) => {
if (
const isValidStatus = (validatorStatus: string, tabStatus: string) =>
validatorStatus === tabStatus ||
tabStatus ===
VALIDATOR_TABS_MANAGEMENT[VALIDATOR_TABS_MANAGEMENT.length - 1]
) {
return true
}
return false
}
tabStatus === VALIDATOR_TABS_MANAGEMENT[VALIDATOR_TABS_MANAGEMENT.length - 1]
const isValidNameOrAddress = (
validatorName: string,