Browse Source

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

* Ban 32 pubs

* Add period
guibescos 2 years ago
parent
commit
040169a196

+ 8 - 0
governance/xc_admin/packages/xc_admin_frontend/components/tabs/General.tsx

@@ -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
   }