From 4339c5d00d848ec0350b59cb6a465e0b5b3d495f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Brzezi=C5=84ski?= Date: Sat, 7 Dec 2024 04:08:06 +0400 Subject: [PATCH] fix (#52) --- .../Mango/MangoV4/OpenBookEditMarket.tsx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pages/dao/[symbol]/proposal/components/instructions/Mango/MangoV4/OpenBookEditMarket.tsx b/pages/dao/[symbol]/proposal/components/instructions/Mango/MangoV4/OpenBookEditMarket.tsx index 086156199..b2524ffd3 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Mango/MangoV4/OpenBookEditMarket.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Mango/MangoV4/OpenBookEditMarket.tsx @@ -53,8 +53,10 @@ const OpenBookEditMarket = ({ const solAccounts = assetAccounts.filter( (x) => x.type === AccountType.SOL && - mangoGroup?.admin && - x.extensions.transferAddress?.equals(mangoGroup.admin) + ((mangoGroup?.admin && + x.extensions.transferAddress?.equals(mangoGroup.admin)) || + (mangoGroup?.securityAdmin && + x.extensions.transferAddress?.equals(mangoGroup.securityAdmin))) ) const shouldBeGoverned = !!(index !== 0 && governance) const [form, setForm] = useState({ @@ -89,10 +91,12 @@ const OpenBookEditMarket = ({ const ix = await mangoClient!.program.methods .serum3EditMarket( - form.reduceOnly, - form.forceClose, - form.name, - form.oraclePriceBand + form.reduceOnly !== market?.reduceOnly ? form.reduceOnly : null, + form.forceClose !== market?.forceClose ? form.forceClose : null, + form.name !== market?.name ? form.name : null, + form.oraclePriceBand !== market?.oraclePriceBand + ? form.oraclePriceBand + : null ) .accounts({ group: mangoGroup!.publicKey,