From b8fa36177916d45ee9f92e84def974ab4acfa7b1 Mon Sep 17 00:00:00 2001 From: abefernan <44572727+abefernan@users.noreply.github.com> Date: Mon, 26 Jun 2023 11:59:01 +0200 Subject: [PATCH] Assert min assets --- components/chainSelect/ChainSelect.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/components/chainSelect/ChainSelect.tsx b/components/chainSelect/ChainSelect.tsx index d9aa6ba..93abf97 100644 --- a/components/chainSelect/ChainSelect.tsx +++ b/components/chainSelect/ChainSelect.tsx @@ -136,6 +136,7 @@ const ChainSelect = () => { try { const chainData = await getChainFromRegistry(chainOption.path); const registryAssets = await getAssetsFromRegistry(chainOption.path); + assert(registryAssets.length >= 1, "No assets found in registry"); const firstAsset = registryAssets[0]; const nodeAddress = await getNodeFromArray(chainData.apis.rpc);