Skip to content

Commit

Permalink
Fix all warnings to use StringOrStringArray
Browse files Browse the repository at this point in the history
  • Loading branch information
jfldde committed Nov 5, 2024
1 parent ede8097 commit 9802f41
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions json/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ pub struct GetNetworkInfoResult {
pub incremental_fee: Amount,
#[serde(rename = "localaddresses")]
pub local_addresses: Vec<GetNetworkInfoResultAddress>,
pub warnings: String,
/// Any network and blockchain warnings. In later versions of bitcoind, it's an array of strings.
pub warnings: StringOrStringArray,
}

#[derive(Clone, PartialEq, Eq, Debug, Deserialize, Serialize)]
Expand Down Expand Up @@ -586,7 +587,8 @@ pub struct GetMiningInfoResult {
pub pooled_tx: usize,
#[serde(deserialize_with = "deserialize_bip70_network")]
pub chain: Network,
pub warnings: String,
/// Any network and blockchain warnings. In later versions of bitcoind, it's an array of strings.
pub warnings: StringOrStringArray,
}

#[derive(Clone, PartialEq, Eq, Debug, Deserialize, Serialize)]
Expand Down

0 comments on commit 9802f41

Please sign in to comment.