Skip to content

Commit

Permalink
program: fix after review
Browse files Browse the repository at this point in the history
  • Loading branch information
farnyser committed Mar 7, 2024
1 parent e99d476 commit b7f6cb1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 3 additions & 2 deletions programs/mango-v4/src/instructions/sequence_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ use crate::state::*;
pub fn sequence_check(ctx: Context<SequenceCheck>, expected_sequence_number: u64) -> Result<()> {
let mut account = ctx.accounts.account.load_full_mut()?;

require!(
expected_sequence_number == account.fixed.sequence_number,
require_eq!(
expected_sequence_number,
account.fixed.sequence_number,
MangoError::InvalidSequenceNumber
);

Expand Down
2 changes: 0 additions & 2 deletions programs/mango-v4/tests/cases/test_basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -950,8 +950,6 @@ async fn test_withdraw_skip_bank() -> Result<(), TransportError> {

#[tokio::test]
async fn test_sequence_check() -> Result<(), TransportError> {
// TODO FAS

let context = TestContext::new().await;
let solana = &context.solana.clone();

Expand Down

0 comments on commit b7f6cb1

Please sign in to comment.