Skip to content

Commit e03cd64

Browse files
committed
Support multiple warnings in RPC responses
Following #353.
1 parent 95d035b commit e03cd64

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

json/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ pub struct GetNetworkInfoResult {
118118
pub incremental_fee: Amount,
119119
#[serde(rename = "localaddresses")]
120120
pub local_addresses: Vec<GetNetworkInfoResultAddress>,
121-
pub warnings: String,
121+
pub warnings: StringOrStringArray,
122122
}
123123

124124
#[derive(Clone, PartialEq, Eq, Debug, Deserialize, Serialize)]
@@ -517,7 +517,7 @@ pub struct GetMiningInfoResult {
517517
pub pooled_tx: usize,
518518
#[serde(deserialize_with = "deserialize_bip70_network")]
519519
pub chain: Network,
520-
pub warnings: String,
520+
pub warnings: StringOrStringArray,
521521
}
522522

523523
#[derive(Clone, PartialEq, Eq, Debug, Deserialize, Serialize)]
@@ -1005,7 +1005,7 @@ pub struct GetAddressInfoResult {
10051005
}
10061006

10071007
/// Used to represent values that can either be a string or a string array.
1008-
#[derive(Clone, Debug, Deserialize, Serialize)]
1008+
#[derive(Clone, Debug, Deserialize, PartialEq, Eq, Serialize)]
10091009
#[serde(untagged)]
10101010
pub enum StringOrStringArray {
10111011
String(String),

0 commit comments

Comments
 (0)