@@ -35,6 +35,7 @@ pub enum PayloadPropertyValue {
3535 BestAskPrice ( Option < Price > ) ,
3636 PublisherCount ( Option < u16 > ) ,
3737 Exponent ( i16 ) ,
38+ Confidence ( Option < Price > ) ,
3839}
3940
4041#[ derive( Debug , Clone , Default , Serialize , Deserialize ) ]
@@ -78,6 +79,9 @@ impl PayloadData {
7879 PriceFeedProperty :: Exponent => {
7980 PayloadPropertyValue :: Exponent ( * exponent)
8081 }
82+ PriceFeedProperty :: Confidence => {
83+ PayloadPropertyValue :: Confidence ( feed. confidence )
84+ }
8185 } )
8286 . collect ( ) ,
8387 } )
@@ -115,6 +119,10 @@ impl PayloadData {
115119 writer. write_u8 ( PriceFeedProperty :: Exponent as u8 ) ?;
116120 writer. write_i16 :: < BO > ( * exponent) ?;
117121 }
122+ PayloadPropertyValue :: Confidence ( confidence) => {
123+ writer. write_u8 ( PriceFeedProperty :: Confidence as u8 ) ?;
124+ write_option_price :: < BO > ( & mut writer, * confidence) ?;
125+ }
118126 }
119127 }
120128 }
@@ -157,6 +165,8 @@ impl PayloadData {
157165 PayloadPropertyValue :: PublisherCount ( read_option_u16 :: < BO > ( & mut reader) ?)
158166 } else if property == PriceFeedProperty :: Exponent as u8 {
159167 PayloadPropertyValue :: Exponent ( reader. read_i16 :: < BO > ( ) ?)
168+ } else if property == PriceFeedProperty :: Confidence as u8 {
169+ PayloadPropertyValue :: Confidence ( read_option_price :: < BO > ( & mut reader) ?)
160170 } else {
161171 bail ! ( "unknown property" ) ;
162172 } ;
0 commit comments