From bf4fa5160b438ca53ffde9707fbd107fb6cd0fd8 Mon Sep 17 00:00:00 2001 From: Reppelin Tom Date: Wed, 7 Aug 2024 11:27:26 +0200 Subject: [PATCH] feat(oracles): updating the suggestor --- src/component/OracleSuggestor.tsx | 22 ++- .../common/CheckItemOraclesDeployed.tsx | 132 ++++++++++-------- 2 files changed, 87 insertions(+), 67 deletions(-) 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 = () => {