Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cli] Fix private key field being required #15546

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions crates/aptos/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ All notable changes to the Aptos CLI will be captured in this file. This project

# Unreleased

- [`Fix`] CLI config should not always require a private key field to be present.

## [4.6.0] - 2024/11/29
- Add `--node-api-key` flag to `aptos move replay` to allow for querying the fullnode with an API key.
- Add `--chunk-size` flag to allow configuring chunk size for chunked publish mode.
Expand Down
7 changes: 5 additions & 2 deletions crates/aptos/src/common/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,11 @@ pub struct ProfileConfig {
#[serde(skip_serializing_if = "Option::is_none")]
pub network: Option<Network>,
/// Private key for commands.
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(deserialize_with = "deserialize_private_key_with_prefix")]
#[serde(
skip_serializing_if = "Option::is_none",
default,
deserialize_with = "deserialize_private_key_with_prefix"
)]
pub private_key: Option<Ed25519PrivateKey>,
/// Public key for commands
#[serde(skip_serializing_if = "Option::is_none")]
Expand Down
Loading