diff --git a/src/components/settings-modal/p2p-options/p2p-options.module.css b/src/components/settings-modal/p2p-options/p2p-options.module.css index 76ca29ba..9e4567af 100644 --- a/src/components/settings-modal/p2p-options/p2p-options.module.css +++ b/src/components/settings-modal/p2p-options/p2p-options.module.css @@ -25,6 +25,10 @@ height: unset; } +.httpRoutersSettings textarea { + height: unset; +} + .blockchainProvidersSettings textarea { height: unset; } diff --git a/src/components/settings-modal/p2p-options/p2p-options.tsx b/src/components/settings-modal/p2p-options/p2p-options.tsx index a8ff1738..969e239d 100644 --- a/src/components/settings-modal/p2p-options/p2p-options.tsx +++ b/src/components/settings-modal/p2p-options/p2p-options.tsx @@ -7,6 +7,7 @@ interface SettingsProps { ipfsGatewayUrlsRef?: RefObject; mediaIpfsGatewayUrlRef?: RefObject; pubsubProvidersRef?: RefObject; + httpRoutersRef?: RefObject; ethRpcRef?: RefObject; solRpcRef?: RefObject; maticRpcRef?: RefObject; @@ -75,6 +76,30 @@ const PubsubProvidersSettings = ({ pubsubProvidersRef }: SettingsProps) => { ); }; +const HttpRoutersSettings = ({ httpRoutersRef }: SettingsProps) => { + const account = useAccount(); + const { plebbitOptions } = account || {}; + const { httpRoutersOptions } = plebbitOptions || {}; + const plebbitRpc = usePlebbitRpcSettings(); + const isConnectedToRpc = plebbitRpc?.state === 'connected'; + const httpRoutersDefaultValue = httpRoutersOptions?.join('\n'); + + return ( +
+