fix: isSwapDisabled for missing pair types#285
Merged
Conversation
Contributor
Author
|
/bot review |
|
Bot Agent progress:
Progress:
|
There was a problem hiding this comment.
Verdict
Comment
Summary
Posted 1 validated inline finding(s) after final filtering.
Findings
- [P3]
CHANGELOG.md:22This adds a1.9.6changelog entry, butts-client/package.jsonis still at1.9.5. If this PR is meant to ship1.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...
f73d782 to
f8521d5
Compare
Contributor
Author
|
/bot review |
|
Bot Agent progress:
Progress:
|
There was a problem hiding this comment.
Verdict
Comment
Summary
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:157Adding 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...
dannxbt
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.