From 67cd165f166ae2738878101d68ca914e0e847a68 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Mon, 4 Nov 2024 13:32:27 +0100 Subject: [PATCH] fix condition --- .../run-tab/src/lib/components/contractGUI.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx b/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx index da49a73978..30ccf5ec25 100644 --- a/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx @@ -175,12 +175,7 @@ export function ContractGUI(props: ContractGUIProps) { const handleActionClick = async () => { props.getVersion() - if (!props.runTabState.selectExEnv.toLowerCase().includes('vm-') || !props.runTabState.selectExEnv.toLowerCase().includes('basic-http-provider')) { - const status = await props.getCompilerDetails() - if (status === 'Failed') { - props.plugin.call('terminal', 'log', { type: 'log', value: 'Consider opening an issue to update our internal store with your desired chainId.' }) - return - } + if (props.runTabState.selectExEnv.toLowerCase().startsWith('vm-') || props.runTabState.selectExEnv.toLowerCase().includes('basic-http-provider')) { if (deployState.deploy) { const proxyInitializeString = getMultiValsString(initializeFields.current) props.clickCallBack(props.initializerOptions.inputs.inputs, proxyInitializeString, ['Deploy with Proxy']) @@ -231,6 +226,12 @@ export function ContractGUI(props: ContractGUIProps) { props.clickCallBack(props.funcABI.inputs, basicInput) } } else { + const status = await props.getCompilerDetails() + console.log('exenv', props.runTabState.selectExEnv) + if (status === 'Failed') { + props.plugin.call('terminal', 'log', { type: 'log', value: 'Consider opening an issue to update our internal store with your desired chainId.' }) + return + } if (deployState.deploy) { const proxyInitializeString = getMultiValsString(initializeFields.current) props.clickCallBack(props.initializerOptions.inputs.inputs, proxyInitializeString, ['Deploy with Proxy'])