diff --git a/state-chain/runtime/src/runtime_apis.rs b/state-chain/runtime/src/runtime_apis.rs index 3e52b7f08c..36fc42738a 100644 --- a/state-chain/runtime/src/runtime_apis.rs +++ b/state-chain/runtime/src/runtime_apis.rs @@ -62,15 +62,17 @@ pub struct ValidatorInfo { pub restricted_balances: BTreeMap, } -#[derive(Encode, Decode, Eq, PartialEq, TypeInfo, Serialize, Deserialize)] +#[derive(Encode, Decode, Eq, PartialEq, TypeInfo)] +#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub struct BoostPoolDepth { - #[serde(flatten)] + #[cfg_attr(feature = "std", serde(flatten))] pub asset: Asset, pub tier: u16, - #[serde(serialize_with = "serialize_as_hex")] + #[cfg_attr(feature = "std", serde(serialize_with = "serialize_as_hex"))] pub available_amount: AssetAmount, } +#[cfg(feature = "std")] fn serialize_as_hex(amount: &AssetAmount, s: S) -> Result where S: serde::Serializer,