From d85df8bb55910d085c2d688cfd02e50d561ab0bd Mon Sep 17 00:00:00 2001 From: MananTank Date: Mon, 16 Dec 2024 21:35:39 +0000 Subject: [PATCH] [DASH-635] Fix useActiveWalletChain not returning custom chain (#5752) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Problem solved Short description of the bug fixed or feature added --- ## PR-Codex overview This PR adds functionality to handle custom chains by mapping them to a new format and storing them in a separate array. ### Detailed summary - Added a line to push mapped custom chains to the `allChainsV5` array using `mapV4ChainToV5Chain(c)`. - Included an ESLint directive to disable the `no-restricted-syntax` rule for the new line. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- apps/dashboard/src/hooks/chains/allChains.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/dashboard/src/hooks/chains/allChains.ts b/apps/dashboard/src/hooks/chains/allChains.ts index b68db380936..9d71f92b43f 100644 --- a/apps/dashboard/src/hooks/chains/allChains.ts +++ b/apps/dashboard/src/hooks/chains/allChains.ts @@ -86,6 +86,8 @@ function createAllChainsStore() { for (const c of chainOverrides) { if (c.isCustom) { allChains.push(c); + // eslint-disable-next-line no-restricted-syntax + allChainsV5.push(mapV4ChainToV5Chain(c)); idToChain.set(c.chainId, c); nameToChain.set(c.name, c); slugToChain.set(c.slug, c);