[xc-admin] Forbid more than 32 pubs (#607)

* Ban 32 pubs

* Add period
This commit is contained in:
guibescos 2023-02-17 12:19:53 +00:00 committed by GitHub
parent 8a6e0e6e4b
commit 040169a196
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -240,6 +240,14 @@ const General = () => {
}
})
// check that no price account has more than 32 publishers
Object.keys(jsonParsed).forEach((symbol) => {
if (jsonParsed[symbol].priceAccounts[0].publishers.length > 32) {
toast.error(`A price account can't have more than 32 publishers.`)
isValid = false
}
})
return isValid
}