Skip to content

Commit 040169a

Browse files
authored
[xc-admin] Forbid more than 32 pubs (#607)
* Ban 32 pubs * Add period
1 parent 8a6e0e6 commit 040169a

File tree

1 file changed

+8
-0
lines changed
  • governance/xc_admin/packages/xc_admin_frontend/components/tabs

1 file changed

+8
-0
lines changed

governance/xc_admin/packages/xc_admin_frontend/components/tabs/General.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,14 @@ const General = () => {
240240
}
241241
})
242242

243+
// check that no price account has more than 32 publishers
244+
Object.keys(jsonParsed).forEach((symbol) => {
245+
if (jsonParsed[symbol].priceAccounts[0].publishers.length > 32) {
246+
toast.error(`A price account can't have more than 32 publishers.`)
247+
isValid = false
248+
}
249+
})
250+
243251
return isValid
244252
}
245253

0 commit comments

Comments
 (0)