diff --git a/libs/remix-ui/run-tab/src/lib/components/instanceContainerUI.tsx b/libs/remix-ui/run-tab/src/lib/components/instanceContainerUI.tsx index 7fcc0b4970..7ba6655a86 100644 --- a/libs/remix-ui/run-tab/src/lib/components/instanceContainerUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/instanceContainerUI.tsx @@ -7,14 +7,10 @@ import { UniversalDappUI } from './universalDappUI' export function InstanceContainerUI(props: InstanceContainerProps) { const { instanceList } = props.instances - const enableSave = useRef(false) const chainId = useRef() useEffect(() => { const fetchSavedContracts = async () => { - if (props.plugin.REACT_API.selectExEnv && props.plugin.REACT_API.selectExEnv.startsWith('vm-')) enableSave.current = false - else enableSave.current = true - if (enableSave.current) { const { network } = await props.plugin.call('blockchain', 'getCurrentNetworkStatus') chainId.current = network.id // Move contract saved in localstorage to Remix FE @@ -54,7 +50,6 @@ export function InstanceContainerUI(props: InstanceContainerProps) { console.log(err) } } - } } fetchSavedContracts() }, [props.plugin.REACT_API.selectExEnv, props.plugin.REACT_API.networkName]) @@ -65,7 +60,6 @@ export function InstanceContainerUI(props: InstanceContainerProps) { return (
- { enableSave.current ? (
}> -
) : null } - { enableSave.current ? ( - props.savedInstances.instanceList.length > 0 ? ( +
+ + {props.savedInstances.instanceList.length > 0 ? (
{' '} {props.savedInstances.instanceList.map((instance, index) => { @@ -104,8 +98,7 @@ export function InstanceContainerUI(props: InstanceContainerProps) { - ) - ) : null } + )}
}> diff --git a/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx b/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx index 166a64583c..9b7e97b1c2 100644 --- a/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx @@ -269,8 +269,7 @@ export function UniversalDappUI(props: UdappProps) {
- { !(props.plugin.REACT_API.selectExEnv && props.plugin.REACT_API.selectExEnv.startsWith('vm-')) ? - props.isSavedContract ? (
+ { props.isSavedContract ? (
}> @@ -279,7 +278,7 @@ export function UniversalDappUI(props: UdappProps) {
) - : null} + }
{ props.isSavedContract ? (
}>