program; fix health check ix gate (#940)
This commit is contained in:
parent
d0125e9fdf
commit
fe86295d3c
|
@ -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>,
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue