Skip to content

Commit

Permalink
Fix private key field being required (#15546)
Browse files Browse the repository at this point in the history
  • Loading branch information
GhostWalker562 authored Dec 9, 2024
1 parent 42d47ee commit f3319d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
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

0 comments on commit f3319d1

Please sign in to comment.