Skip to content

Commit

Permalink
fix (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
abrzezinski94 authored Dec 7, 2024
1 parent eccce2d commit 4339c5d
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<OpenBookEditMarketForm>({
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 4339c5d

Please sign in to comment.