Skip to content

Commit

Permalink
Fix ratings creating empty value
Browse files Browse the repository at this point in the history
  • Loading branch information
kattylucy committed Dec 4, 2024
1 parent 8ba532e commit 9fd25fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions centrifuge-app/src/pages/IssuerCreatePool/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,9 @@ const IssuerCreatePoolPage = () => {
}

// Pool ratings
if (values.poolRatings && values.poolRatings[0].agency !== '') {
if (values.poolRatings[0].agency === '') {
metadataValues.poolRatings = []
} else {
const newRatingReports = await Promise.all(
values.poolRatings.map((rating) => pinFileIfExists(centrifuge, rating.reportFile ?? null))
)
Expand All @@ -296,8 +298,6 @@ const IssuerCreatePoolPage = () => {
reportFile: pinnedReport ? { uri: pinnedReport.uri, mime: rating.reportFile?.type ?? '' } : null,
}
})

metadataValues.poolRatings = ratings
}

// Tranches
Expand Down

0 comments on commit 9fd25fe

Please sign in to comment.