diff --git a/src/libs/TransactionUtils.ts b/src/libs/TransactionUtils.ts index 463067a7dfce..33b409daf3d2 100644 --- a/src/libs/TransactionUtils.ts +++ b/src/libs/TransactionUtils.ts @@ -690,9 +690,7 @@ function hasNoticeTypeViolation(transactionID: string, transactionViolations: On * Checks if any violations for the provided transaction are of type 'warning' */ function hasWarningTypeViolation(transactionID: string, transactionViolations: OnyxCollection): boolean { - return Boolean( - transactionViolations?.[ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS + transactionID]?.some((violation: TransactionViolation) => violation.type === CONST.VIOLATION_TYPES.WARNING), - ); + return !!transactionViolations?.[ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS + transactionID]?.some((violation: TransactionViolation) => violation.type === CONST.VIOLATION_TYPES.WARNING); } /** diff --git a/src/pages/signin/SignInPage.tsx b/src/pages/signin/SignInPage.tsx index 879f2c047052..407ce6304f2b 100644 --- a/src/pages/signin/SignInPage.tsx +++ b/src/pages/signin/SignInPage.tsx @@ -112,7 +112,7 @@ function getRenderOptions({ } // Show the Welcome form if a user is signing up for a new account in a domain that is not controlled - const shouldShouldSignUpWelcomeForm = Boolean(credentials?.login) && !account?.validated && !account?.accountExists && !account?.domainControlled; + const shouldShouldSignUpWelcomeForm = !!credentials?.login && !account?.validated && !account?.accountExists && !account?.domainControlled; const shouldShowLoginForm = !shouldShowAnotherLoginPageOpenedMessage && !hasLogin && !hasValidateCode; const shouldShowEmailDeliveryFailurePage = hasLogin && hasEmailDeliveryFailure && !shouldShowChooseSSOOrMagicCode && !shouldInitiateSAMLLogin; const isUnvalidatedSecondaryLogin = hasLogin && !isPrimaryLogin && !account?.validated && !hasEmailDeliveryFailure;