From ac56624295334df39028a8248de7d81e4ab89270 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 22 Feb 2024 20:07:13 +0530 Subject: [PATCH] remove null entries --- libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 b728c18a6b..16f97a4fdc 100644 --- a/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx @@ -59,7 +59,6 @@ export function UniversalDappUI(props: UdappProps) { }, [props.instance.balance]) useEffect(() => { - console.log('props--->', props.instance) const getEnv = async () => { env.current = await props.plugin.call('blockchain', 'getProvider') } @@ -128,7 +127,7 @@ export function UniversalDappUI(props: UdappProps) { const savedContractsJson = JSON.parse(savedContracts) const instanceIndex = savedContractsJson[env][network.id].findIndex(instance => instance && instance.address === props.instance.address) delete savedContractsJson[env][network.id][instanceIndex] - localStorage.setItem('savedContracts', JSON.stringify(savedContractsJson)) + localStorage.setItem('savedContracts', JSON.stringify(savedContractsJson[env][network.id].filter(Boolean))) } props.removeInstance(props.index, props.isSavedContract) } @@ -136,7 +135,6 @@ export function UniversalDappUI(props: UdappProps) { const saveContract = async() => { const env = await props.plugin.call('blockchain', 'getProvider') const workspace = await props.plugin.call('filePanel', 'getCurrentWorkspace') - console.log('workspace--->', workspace) const {network} = await props.plugin.call('blockchain', 'getCurrentNetworkStatus') const savedContracts = localStorage.getItem('savedContracts') let objToSave