@@ -5,6 +5,9 @@ use parity_scale_codec::{Decode, Encode, HasCompact, MaxEncodedLen};
5
5
use scale_info:: TypeInfo ;
6
6
use sp_runtime:: { DispatchResult , Percent } ;
7
7
8
+ #[ cfg( feature = "std" ) ]
9
+ use serde:: { Deserialize , Serialize } ;
10
+
8
11
/// The PaymentDetail struct stores information about the payment/escrow
9
12
/// A "payment" in virto network is similar to an escrow, it is used to
10
13
/// guarantee proof of funds and can be released once an agreed upon condition
@@ -13,7 +16,7 @@ use sp_runtime::{DispatchResult, Percent};
13
16
#[ derive( Encode , Decode , Debug , Clone , PartialEq , Eq , MaxEncodedLen , TypeInfo ) ]
14
17
#[ scale_info( skip_type_params( T ) ) ]
15
18
#[ codec( mel_bound( T : pallet:: Config ) ) ]
16
- #[ cfg_attr( feature = "serde " , derive( serde :: Serialize , serde :: Deserialize ) ) ]
19
+ #[ cfg_attr( feature = "std " , derive( Serialize , Deserialize ) ) ]
17
20
pub struct PaymentDetail < T : pallet:: Config > {
18
21
/// type of asset used for payment
19
22
pub asset : AssetIdOf < T > ,
@@ -38,7 +41,7 @@ pub struct PaymentDetail<T: pallet::Config> {
38
41
#[ derive( Encode , Decode , Debug , Clone , PartialEq , Eq , MaxEncodedLen , TypeInfo ) ]
39
42
#[ scale_info( skip_type_params( T ) ) ]
40
43
#[ codec( mel_bound( T : pallet:: Config ) ) ]
41
- #[ cfg_attr( feature = "serde " , derive( serde :: Serialize , serde :: Deserialize ) ) ]
44
+ #[ cfg_attr( feature = "std " , derive( Serialize , Deserialize ) ) ]
42
45
pub enum PaymentState < T : pallet:: Config > {
43
46
/// Amounts have been reserved and waiting for release/cancel
44
47
Created ,
0 commit comments