diff --git a/app/ts/components/Navbar.tsx b/app/ts/components/Navbar.tsx index cce1583..c72c8ba 100644 --- a/app/ts/components/Navbar.tsx +++ b/app/ts/components/Navbar.tsx @@ -47,6 +47,7 @@ export const Navbar = ({ className='px-2 py-1 bg-black' > {bouquetSettings.value.map((network) => )} + {bouquetSettings.value.find((network) => network.chainId === provider.value?.chainId) === undefined ? : <>>} diff --git a/app/ts/components/Settings.tsx b/app/ts/components/Settings.tsx index 4f215ee..5c86525 100644 --- a/app/ts/components/Settings.tsx +++ b/app/ts/components/Settings.tsx @@ -39,7 +39,7 @@ export const SettingsModal = ({ display, bouquetNetwork, bouquetSettings }: { di const mempoolSubmitRpcEndpoint = useSignal({ value: bouquetNetwork.peek().mempoolSubmitRpcEndpoint, valid: true }) const relayMode = useSignal({ value: bouquetNetwork.peek().relayMode, valid: true }) const loaded = useSignal(false) - + useEffect(() => { bringSettingsValues() loaded.value = display.value @@ -108,7 +108,7 @@ export const SettingsModal = ({ display, bouquetNetwork, bouquetSettings }: { di { ...newSettings, chainId: chainId.value.value, - networkName: `ChainId: ${ chainId }`, + networkName: `ChainId: ${ chainId.value.value }`, blockExplorerApi: '', blockExplorer: '', } @@ -120,6 +120,7 @@ export const SettingsModal = ({ display, bouquetNetwork, bouquetSettings }: { di function bringSettingsValues() { batch(() => { + chainId.value = { value: bouquetNetwork.peek().chainId, valid: true } simulationRelayEndpointInput.value = { value: bouquetNetwork.peek().simulationRelayEndpoint, valid: true } submissionRelayEndpointInput.value = { value: bouquetNetwork.peek().submissionRelayEndpoint, valid: true } priorityFeeInput.value = { value: formatUnits(bouquetNetwork.peek().priorityFee, 'gwei'), valid: true } @@ -155,7 +156,7 @@ export const SettingsModal = ({ display, bouquetNetwork, bouquetSettings }: { di Mempool Submit RPC URL ) => validateMempoolSubmitRpcEndpoint(e.currentTarget.value)} value={mempoolSubmitRpcEndpoint.value.value} type='text' className='bg-transparent outline-none placeholder:text-gray-600' placeholder='https://' /> - > : <> + > : <>