File tree Expand file tree Collapse file tree 1 file changed +16
-18
lines changed
apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/_utils Expand file tree Collapse file tree 1 file changed +16
-18
lines changed Original file line number Diff line number Diff line change @@ -20,27 +20,25 @@ export async function getContractPageParamsInfo(params: {
2020 // move on
2121 }
2222
23- if ( ! chainMetadata ) {
24- const cookieStore = cookies ( ) ;
25- const localChainStoreValue = cookieStore . get ( TW_LOCAL_CHAIN_STORE ) ?. value ;
23+ const cookieStore = cookies ( ) ;
24+ const localChainStoreValue = cookieStore . get ( TW_LOCAL_CHAIN_STORE ) ?. value ;
2625
27- if ( localChainStoreValue ) {
28- try {
29- const chains = JSON . parse ( decodeURIComponent ( localChainStoreValue ) ) ;
30- if ( typeof chains === "object" && Array . isArray ( chains ) ) {
31- const chainOverrides = chains as ChainMetadata [ ] ;
32- const chain = chainOverrides . find (
33- ( c ) =>
34- c . slug === chainSlugOrId ||
35- c . chainId === Number . parseInt ( chainSlugOrId ) ,
36- ) ;
37- if ( chain ) {
38- chainMetadata = chain ;
39- }
26+ if ( localChainStoreValue ) {
27+ try {
28+ const chains = JSON . parse ( decodeURIComponent ( localChainStoreValue ) ) ;
29+ if ( typeof chains === "object" && Array . isArray ( chains ) ) {
30+ const chainOverrides = chains as ChainMetadata [ ] ;
31+ const chain = chainOverrides . find (
32+ ( c ) =>
33+ c . slug === chainSlugOrId ||
34+ c . chainId === Number . parseInt ( chainSlugOrId ) ,
35+ ) ;
36+ if ( chain ) {
37+ chainMetadata = chain ;
4038 }
41- } catch {
42- // noop
4339 }
40+ } catch {
41+ // noop
4442 }
4543 }
4644
You can’t perform that action at this time.
0 commit comments