From 0dc9d9ab8007f410364b8eaf1502ca25b1b85836 Mon Sep 17 00:00:00 2001 From: Serge Farny Date: Thu, 11 Apr 2024 07:22:29 +0200 Subject: [PATCH] program; fix health check ix gate (#940) (cherry picked from commit fe86295d3c09db91424f5de3e12a3f66fdffd8d5) --- programs/mango-v4/src/accounts_ix/health_check.rs | 2 +- ts/client/src/clientIxParamBuilder.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/programs/mango-v4/src/accounts_ix/health_check.rs b/programs/mango-v4/src/accounts_ix/health_check.rs index c405a4fa3..677dd0d3d 100644 --- a/programs/mango-v4/src/accounts_ix/health_check.rs +++ b/programs/mango-v4/src/accounts_ix/health_check.rs @@ -17,7 +17,7 @@ pub enum HealthCheckKind { #[derive(Accounts)] pub struct HealthCheck<'info> { #[account( - constraint = group.load()?.is_ix_enabled(IxGate::SequenceCheck) @ MangoError::IxIsDisabled, + constraint = group.load()?.is_ix_enabled(IxGate::HealthCheck) @ MangoError::IxIsDisabled, )] pub group: AccountLoader<'info, Group>, diff --git a/ts/client/src/clientIxParamBuilder.ts b/ts/client/src/clientIxParamBuilder.ts index 3baa5a1d2..ddfb1dd51 100644 --- a/ts/client/src/clientIxParamBuilder.ts +++ b/ts/client/src/clientIxParamBuilder.ts @@ -311,6 +311,7 @@ export interface IxGateParams { Serum3PlaceOrderV2: boolean; TokenForceWithdraw: boolean; SequenceCheck: boolean; + HealthCheck: boolean; } // Default with all ixs enabled, use with buildIxGate @@ -392,6 +393,7 @@ export const TrueIxGateParams: IxGateParams = { Serum3PlaceOrderV2: true, TokenForceWithdraw: true, SequenceCheck: true, + HealthCheck: true, }; // build ix gate e.g. buildIxGate(Builder(TrueIxGateParams).TokenDeposit(false).build()).toNumber(), @@ -483,6 +485,7 @@ export function buildIxGate(p: IxGateParams): BN { toggleIx(ixGate, p, 'Serum3PlaceOrderV2', 71); toggleIx(ixGate, p, 'TokenForceWithdraw', 72); toggleIx(ixGate, p, 'SequenceCheck', 73); + toggleIx(ixGate, p, 'HealthCheck', 74); return ixGate; }