소스 검색

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

* Ban 32 pubs

* Add period
guibescos 2 년 전
부모
커밋
040169a196
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      governance/xc_admin/packages/xc_admin_frontend/components/tabs/General.tsx

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