11'use client'
22import * as React from 'react'
33import { Label } from '@/components/ui/label'
4- import { DEFAULT_CHAIN_ID , geSidebarNavItems , EXAMPLE_TXS , INTERPRETER_REPO } from '@/app/data'
4+ import { EXAMPLE_TXS , INTERPRETER_REPO } from '@/app/data'
55import { useLocalStorage } from 'usehooks-ts'
6- import { SidebarNav } from '@/components/ui/sidebar-nav'
76import { PlayIcon } from '@radix-ui/react-icons'
87import { Input } from '@/components/ui/input'
98import { Button } from '@/components/ui/button'
@@ -16,14 +15,14 @@ import { fallbackInterpreter, getInterpreter } from '@3loop/transaction-interpre
1615import { ExampleTransactions } from '@/components/ui/examples'
1716
1817interface FormProps {
19- currentChainID : number
18+ chainID : number
2019 decoded ?: DecodedTransaction
2120 currentHash ?: string
2221}
2322
2423const PATH = 'interpret'
2524
26- export default function DecodingForm ( { decoded, currentHash, currentChainID } : FormProps ) {
25+ export default function DecodingForm ( { decoded, currentHash, chainID } : FormProps ) {
2726 const [ result , setResult ] = React . useState < Interpretation > ( )
2827 const [ persistedSchema , setSchema ] = useLocalStorage ( decoded ?. toAddress ?? 'unknown' , '' )
2928
@@ -44,7 +43,7 @@ export default function DecodingForm({ decoded, currentHash, currentChainID }: F
4443 const onSubmit = ( e : React . FormEvent < HTMLFormElement > ) => {
4544 e . preventDefault ( )
4645 const hash = ( e . target as any ) . hash . value
47- router . push ( `/${ PATH } /${ currentChainID } /${ hash } ` )
46+ router . push ( `/${ PATH } /${ chainID } /${ hash } ` )
4847 }
4948
5049 const onRun = React . useCallback ( ( ) => {
@@ -84,7 +83,7 @@ export default function DecodingForm({ decoded, currentHash, currentChainID }: F
8483 < div className = "flex w-full lg:items-center gap-2 flex-col lg:flex-row" >
8584 < div >
8685 < NetworkSelect
87- defaultValue = { currentChainID . toString ( ) }
86+ defaultValue = { chainID . toString ( ) }
8887 onValueChange = { ( value ) => {
8988 const hash = currentHash || ''
9089 router . push ( `/${ PATH } /${ value } /${ hash } ` )
0 commit comments