Skip to content

fix(solana): use BTreeMap in exponent_finance and kamino_limit configs#297

Merged
prasanna-anchorage merged 1 commit into
mainfrom
fix/hashmap-ban-followup
May 13, 2026
Merged

fix(solana): use BTreeMap in exponent_finance and kamino_limit configs#297
prasanna-anchorage merged 1 commit into
mainfrom
fix/hashmap-ban-followup

Conversation

@prasanna-anchorage
Copy link
Copy Markdown
Contributor

Summary

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:

Both still constructed HashMap and passed it where SolanaIntegrationConfigData now expects BTreeMap, so cargo build -p visualsign-solana fails 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() to BTreeMap::new() and update the use import in each file. No semantic change — SolanaIntegrationConfigData already deterministically orders via BTreeMap, so this just aligns construction with the expected type.

Test plan

  • cargo build -p visualsign-solana succeeds locally
  • cargo clippy -p visualsign-solana --all-targets -- -D warnings is clean locally
  • cargo fmt --check is clean
  • CI green

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings May 13, 2026 19:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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() for BTreeMap::new() in both preset configs
  • Update use std::collections::HashMap imports to BTreeMap

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 HashMapBTreeMap switch for the exponent_finance preset

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@prasanna-anchorage prasanna-anchorage merged commit aa831a1 into main May 13, 2026
12 checks passed
@prasanna-anchorage prasanna-anchorage deleted the fix/hashmap-ban-followup branch May 13, 2026 20:34
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

BTreeMap 🚀

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.

3 participants