fix(solana): use BTreeMap in exponent_finance and kamino_limit configs#297
Merged
Conversation
PR #288 forbade std::collections::HashMap/HashSet via clippy disallowed-types and converted the existing preset configs to BTreeMap, but missed the two presets that landed during the same review window: - exponent_finance (PR #275, merged 2026-05-12 22:00 UTC) - kamino_limit (PR #284, merged 2026-05-11 14:50 UTC) Both still constructed HashMap and passed it where SolanaIntegrationConfigData now expects BTreeMap, so `cargo build -p visualsign-solana` fails on post-#288 main. Verified locally: `cargo build -p visualsign-solana` and `cargo clippy -p visualsign-solana --all-targets -- -D warnings` are clean; `cargo fmt --check` passes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Mechanical fix to align two preset configs (exponent_finance, kamino_limit) with the BTreeMap-based SolanaIntegrationConfigData introduced in #288. Both presets were merged during the same review window as #288 and still constructed HashMap, breaking the build.
Changes:
- Swap
HashMap::new()forBTreeMap::new()in both preset configs - Update
use std::collections::HashMapimports toBTreeMap
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/chain_parsers/visualsign-solana/src/presets/kamino_limit/config.rs | Switches programs/instructions map construction from HashMap to BTreeMap |
| src/chain_parsers/visualsign-solana/src/presets/exponent_finance/config.rs | Same HashMap → BTreeMap switch for the exponent_finance preset |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
shahan-khatchadourian-anchorage
left a comment
There was a problem hiding this comment.
BTreeMap 🚀
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.
Summary
PR #288 forbade
std::collections::{HashMap, HashSet}via clippydisallowed-typesand converted the existing preset configs toBTreeMap, but missed the two presets that landed during the same review window:exponent_finance(PR Add Exponent Finance Solana visualizer preset #275, merged 2026-05-12 22:00 UTC)kamino_limit(PR Add Kamino Limit Orders Solana preset #284, merged 2026-05-11 14:50 UTC)Both still constructed
HashMapand passed it whereSolanaIntegrationConfigDatanow expectsBTreeMap, socargo build -p visualsign-solanafails on post-#288 main. This is blocking PR #278 (and any other PR rebasing onto main) from going green.Two trivial 2-line edits: change
HashMap::new()toBTreeMap::new()and update theuseimport in each file. No semantic change —SolanaIntegrationConfigDataalready deterministically orders viaBTreeMap, so this just aligns construction with the expected type.Test plan
cargo build -p visualsign-solanasucceeds locallycargo clippy -p visualsign-solana --all-targets -- -D warningsis clean locallycargo fmt --checkis clean🤖 Generated with Claude Code