Skip to content

Commit

Permalink
Merge pull request #563 from hats-finance/develop
Browse files Browse the repository at this point in the history
Small fixes
  • Loading branch information
fonstack authored Oct 2, 2023
2 parents 4058721 + a492cbd commit c46589b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const ScopeDetailsForm = () => {
return (
<StyledScopeDetailsForm>
{/* Private audits alert */}
{isAdvancedMode && isPrivateAudit && (
{isPrivateAudit && (
<Alert className="mt-2 mb-4" type="warning">
{t("scopePrivateAuditsWarning")}
</Alert>
Expand Down Expand Up @@ -126,7 +126,7 @@ export const ScopeDetailsForm = () => {
)}

{/* Repos and documentation */}
{isAdvancedMode && !isPrivateAudit && (
{!isPrivateAudit && (
<>
<p className="section-title mt-5">{t("VaultEditor.reposAndDocumentation")}</p>
<ScopeReposInformation />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,14 @@ export const getEditedDescriptionYupSchema = (intl: TFunction) =>
Yup.object({
url: Yup.string()
.test(getTestGithubRepoUrl(intl))
.test("required", intl("required"), (val, ctx: any) => !!ctx.from[2].value["project-metadata"]?.isPrivateAudit),
.test("required", intl("required"), (val, ctx: any) =>
!!ctx.from[2].value["project-metadata"]?.isPrivateAudit ? true : !!val
),
commitHash: Yup.string()
.test(getTestGitCommitHash(intl))
.test("required", intl("required"), (val, ctx: any) => !!ctx.from[2].value["project-metadata"]?.isPrivateAudit),
.test("required", intl("required"), (val, ctx: any) =>
!!ctx.from[2].value["project-metadata"]?.isPrivateAudit ? true : !!val
),
isMain: Yup.boolean(),
})
),
Expand Down

0 comments on commit c46589b

Please sign in to comment.