Standardize --asset-class flag and fix setup config path#18
Merged
Conversation
The `pairs`, `assets`, `ledgers`, and all funding/withdrawal commands used `--aclass` while the rest of the CLI used `--asset-class`. This inconsistency caused errors when users applied the same flag across commands. Renamed the CLI flag to `--asset-class` everywhere and added `--aclass` as a hidden alias for backward compatibility. The Kraken API parameter names sent in HTTP requests remain unchanged. Fixes: #12 Made-with: Cursor
README.md and AGENTS.md still showed --aclass in command reference tables and examples. Updated all occurrences to --asset-class to match the standardized CLI flag. Made-with: Cursor
The setup wizard hardcoded ~/.config/kraken/config.toml in both the intro and completion messages. On macOS the actual path is ~/Library/Application Support/kraken/config.toml. Now resolves the path at runtime via config::config_path(), with a generic fallback if resolution fails. Fixes: https://seabound.atlassian.net/browse/AIAN-263 Made-with: Cursor
Verifies config_path() returns a valid path ending in kraken/config.toml and that the display formatting produces a non-empty string containing 'kraken'. Covers the code path introduced in the previous commit. Made-with: Cursor
Made-with: Cursor
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
--asset-classas the canonical CLI flag across all commands that previously used--aclass. Keeps--aclassas a hidden alias for backward compatibility. Kraken API parameter names in HTTP requests are unchanged.setupwizard to display the actual platform-specific config path instead of a hardcoded Linux path.Changes
Flag standardization (fixes #12)
aclassstruct fields toasset_classinlib.rs,commands/market.rs,commands/funding.rs,commands/account.rsalias = "aclass"on all affected#[arg]attributesagents/tool-catalog.json,README.md, andAGENTS.mdto reflect the canonical flag nameSetup config path fix
src/commands/utility.rs: replaced hardcoded~/.config/kraken/config.tomlwith runtime-resolved path viaconfig::config_path()config_path_resolves_to_config_tomlandconfig_path_display_is_valid_stringtests insrc/config.rsAffected commands
assets,pairs,ledgers,deposit methods,deposit addresses,deposit status,withdraw,withdrawal methods,withdrawal addresses,withdrawal status,setupTest plan
cargo fmt --all --check: passcargo clippy --all --all-targets --all-features -- -Dwarnings: passcargo test --all-targets: 285 unit + 83 integration tests passcargo build --release: pass--asset-classand--aclassalias coverage)Made with Cursor