Skip to content

fix: isSwapDisabled for missing pair types#285

Merged
bangyro merged 1 commit intomainfrom
fix/is_swap_disabled_for_missing_pair_type
Apr 17, 2026
Merged

fix: isSwapDisabled for missing pair types#285
bangyro merged 1 commit intomainfrom
fix/is_swap_disabled_for_missing_pair_type

Conversation

@bangyro
Copy link
Copy Markdown
Contributor

@bangyro bangyro commented Apr 17, 2026

No description provided.

@bangyro
Copy link
Copy Markdown
Contributor Author

bangyro commented Apr 17, 2026

/bot review

@metoeraag-bot
Copy link
Copy Markdown

metoeraag-bot bot commented Apr 17, 2026

Bot Agent progress: /bot review

Progress:

  • Repo checks (5 ok, 1 failed)
  • Context build
  • Codex review (1 pass)
  • Parallel review (Claude (API) + Codex merged)
  • Post review

Copy link
Copy Markdown

@metoeraag-bot metoeraag-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict

Comment

Summary

⚠️ Limited-confidence review: check failed: cargo clippy --workspace --all-targets -- -D warnings.

Posted 1 validated inline finding(s) after final filtering.

Findings
  • [P3] CHANGELOG.md:22 This adds a 1.9.6 changelog entry, but ts-client/package.json is still at 1.9.5. If this PR is meant to ship 1.9.6, please bump the package version too so the published package metadata stays in sync with the changelog.
Repo checks

Repo Checks

  • rustup component add --toolchain 1.85.0-x86_64-unknown-linux-gnu rustfmt: ok
info: component rustfmt is up to date
  • rustup component add --toolchain 1.85.0-x86_64-unknown-linux-gnu clippy: ok
info: component clippy is up to date
  • cargo fetch --locked: ok
  • cargo check --workspace: ok
2.4
    Checking solana-account-decoder v2.2.4
    Checking solana-rent-collector v2.3.0
    Checking solana-offchain-message v2.2.1
    Checking solana-rent-debits v2.2.1
    Checking solana-system-transaction v2.2.1
    Checking solana-nonce-account v2.2.1
    Checking solana-presigner v2.2.1
    Checking solana-compute-budget-interface v2.2.1
    Checking is_terminal_polyfill v1.70.1
    Checking anstyle-query v1.1.2
    Checking solana-validator-exit v2.2.1
    Checking option-ext v0.2.0
    Checking anstyle v1.0.10
    Checking colorchoice v1.0.0
    Checking dirs-sys v0.4.1
    Checking clap_lex v0.6.0
   Compiling ruint-macro v1.2.1
   Compiling heck v0.4.1
   Compiling rust_decimal v1.37.1
    Checking anstream v0.6.18
    Checking solana-rpc-client-api v2.2.4
   Compiling clap_derive v4.4.7
    Checking clap_builder v4.4.7
    Checking dirs v5.0.1
    Checking ruint v1.9.0
   Compiling bigdecimal v0.4.7
    Checking shellexpand v3.1.0
    Checking webpki-roots v0.26.8
    Checking anchor-lang v0.31.0
    Checking ureq v2.12.1
    Checking solana-transaction-status v2.2.4
    Checking routerify v3.0.0
    Checking serde_json_any_key v2.0.0
    Checking anchor-spl v0.31.0
    Checking solana-rpc-client v2.2.4
    Checking solana-pubsub-client v2.2.4
    Checking solana-quic-client v2.2.4
    Checking clap v4.4.7
    Checking ark-poly v0.4.2
    Checking solana-rpc-client-nonce-utils v2.2.4
    Checking solana-tpu-client v2.2.4
    Checking solana-thin-client v2.2.4
    Checking solana-client v2.2.4
    Checking ark-ec v0.4.2
    Checking ark-bn254 v0.4.0
    Checking solana-bn254 v2.2.1
    Checking solana-sdk v2.2.1
    Checking anchor-client v0.31.0
    Checking commons v0.3.2 (/data/workdir/2962945/MeteoraAg/dlmm-sdk/commons)
    Checking market_making v0.0.1 (/data/workdir/2962945/MeteoraAg/dlmm-sdk/market_making)
    Checking cli v0.5.2 (/data/workdir/2962945/MeteoraAg/dlmm-sdk/cli)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 54.39s
  • cargo fmt --check: ok
  • cargo clippy --workspace --all-targets -- -D warnings: failed
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `bin_array_bitmap >>= bin_array_offset`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern

error: manual implementation of an assign operation
   --> commons/src/extensions/bin_array_bitmap.rs:191:25
    |
191 |                         bin_array_bitmap = bin_array_bitmap >> bin_array_offset;
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `bin_array_bitmap >>= bin_array_offset`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern

error: manual implementation of an assign operation
   --> commons/src/extensions/bin_array_bitmap.rs:221:25
    |
221 | /                         bin_array_bitmap = bin_array_bitmap
222 | |                             << BIN_ARRAY_BITMAP_SIZE as usize - bin_array_offset - 1;
    | |____________________________________________________________________________________^ help: replace it with: `bin_array_bitmap <<= BIN_ARRAY_BITMAP_SIZE as usize - bin_array_offset - 1`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern

error: casting the result of `i32::abs()` to u32
  --> commons/src/math/u64x64_math.rs:29:32
   |
29 |     let exp: u32 = if invert { exp.abs() as u32 } else { exp as u32 };
   |                                ^^^^^^^^^^^^^^^^ help: replace with: `exp.unsigned_abs()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned
   = note: `-D clippy::cast-abs-to-unsigned` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::cast_abs_to_unsigned)]`

error: could not compile `commons` (lib) due to 23 previous errors
warning: build failed, waiting for other jobs to finish...

Comment thread CHANGELOG.md Outdated
@bangyro bangyro force-pushed the fix/is_swap_disabled_for_missing_pair_type branch from f73d782 to f8521d5 Compare April 17, 2026 07:42
@bangyro
Copy link
Copy Markdown
Contributor Author

bangyro commented Apr 17, 2026

/bot review

@metoeraag-bot
Copy link
Copy Markdown

metoeraag-bot bot commented Apr 17, 2026

Bot Agent progress: /bot review

Progress:

  • Repo checks (5 ok, 1 failed)
  • Context build
  • Codex review (1 pass)
  • Parallel review (Claude (API) + Codex merged)
  • Post review

Copy link
Copy Markdown

@metoeraag-bot metoeraag-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict

Comment

Summary

⚠️ Limited-confidence review: check failed: cargo clippy --workspace --all-targets -- -D warnings.

No high-confidence inline findings remained after final filtering; posting lower-confidence concerns as a non-blocking review.

Potential concerns (lower confidence)
  • [P1] ts-client/src/dlmm/types/index.ts:157 Adding variants to this numeric enum assumes the on-chain Rust PairType has the exact order: Permissionless=0, Permissioned=1, CustomizablePermissionless=2, PermissionlessV2=3. Please confirm this matches the program's PairType definition (and IDL). A mismatch would cause isSwapDisabled and other pairType comparisons to silently misclassify pools.
Repo checks

Repo Checks

  • rustup component add --toolchain 1.85.0-x86_64-unknown-linux-gnu rustfmt: ok
info: component rustfmt is up to date
  • rustup component add --toolchain 1.85.0-x86_64-unknown-linux-gnu clippy: ok
info: component clippy is up to date
  • cargo fetch --locked: ok
  • cargo check --workspace: ok
Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.06s
  • cargo fmt --check: ok
  • cargo clippy --workspace --all-targets -- -D warnings: failed
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `bin_array_bitmap >>= bin_array_offset`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern

error: manual implementation of an assign operation
   --> commons/src/extensions/bin_array_bitmap.rs:191:25
    |
191 |                         bin_array_bitmap = bin_array_bitmap >> bin_array_offset;
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `bin_array_bitmap >>= bin_array_offset`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern

error: manual implementation of an assign operation
   --> commons/src/extensions/bin_array_bitmap.rs:221:25
    |
221 | /                         bin_array_bitmap = bin_array_bitmap
222 | |                             << BIN_ARRAY_BITMAP_SIZE as usize - bin_array_offset - 1;
    | |____________________________________________________________________________________^ help: replace it with: `bin_array_bitmap <<= BIN_ARRAY_BITMAP_SIZE as usize - bin_array_offset - 1`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern

error: casting the result of `i32::abs()` to u32
  --> commons/src/math/u64x64_math.rs:29:32
   |
29 |     let exp: u32 = if invert { exp.abs() as u32 } else { exp as u32 };
   |                                ^^^^^^^^^^^^^^^^ help: replace with: `exp.unsigned_abs()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned
   = note: `-D clippy::cast-abs-to-unsigned` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::cast_abs_to_unsigned)]`

error: could not compile `commons` (lib) due to 23 previous errors
warning: build failed, waiting for other jobs to finish...

@bangyro bangyro marked this pull request as ready for review April 17, 2026 08:22
@bangyro bangyro merged commit 358a2db into main Apr 17, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants