diff --git a/crates/aptos/CHANGELOG.md b/crates/aptos/CHANGELOG.md index ffd001a799283..1e2d3237362da 100644 --- a/crates/aptos/CHANGELOG.md +++ b/crates/aptos/CHANGELOG.md @@ -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. diff --git a/crates/aptos/src/common/types.rs b/crates/aptos/src/common/types.rs index d6fb1d3855dc9..13c600ba209f8 100644 --- a/crates/aptos/src/common/types.rs +++ b/crates/aptos/src/common/types.rs @@ -250,8 +250,11 @@ pub struct ProfileConfig { #[serde(skip_serializing_if = "Option::is_none")] pub network: Option, /// 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, /// Public key for commands #[serde(skip_serializing_if = "Option::is_none")]