diff --git a/src/component/OracleSuggestor.tsx b/src/component/OracleSuggestor.tsx index f029d7f..d5b39cc 100644 --- a/src/component/OracleSuggestor.tsx +++ b/src/component/OracleSuggestor.tsx @@ -207,6 +207,16 @@ const OracleSuggestor = () => { return `${baseUrl}${address}`; }; + const handleNetworkChange = (selectedOption: any) => { + setSelectedNetwork(selectedOption || networkOptions[0]); + // Reset collateral and loan asset states + setCollateralAsset(""); + setLoanAsset(""); + setCollateralAssetTouched(false); + setLoanAssetTouched(false); + setShowOracleDetails(false); // Hide oracle details when network changes + }; + return (
@@ -239,9 +249,7 @@ const OracleSuggestor = () => { asset.value === collateralAsset + )} onChange={(selectedOption) => { setCollateralAsset(selectedOption?.value || ""); setCollateralAssetTouched(true); @@ -280,6 +291,7 @@ const OracleSuggestor = () => {