Skip to content

Commit

Permalink
program; fix health check ix gate (#940)
Browse files Browse the repository at this point in the history
(cherry picked from commit fe86295)
  • Loading branch information
farnyser authored and ckamm committed Apr 11, 2024
1 parent 5c7502d commit 0dc9d9a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion programs/mango-v4/src/accounts_ix/health_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,

Expand Down
3 changes: 3 additions & 0 deletions ts/client/src/clientIxParamBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ export interface IxGateParams {
Serum3PlaceOrderV2: boolean;
TokenForceWithdraw: boolean;
SequenceCheck: boolean;
HealthCheck: boolean;
}

// Default with all ixs enabled, use with buildIxGate
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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;
}

0 comments on commit 0dc9d9a

Please sign in to comment.