@@ -98,7 +98,7 @@ router! {SHELL,
9898 ( "conv" / [ asset_type: AssetType ] ) -> Option <Conversion > = read_conversion,
9999
100100 // Conversion state access - read conversion
101- ( "conversions" ) -> BTreeMap <AssetType , ConversionWithoutPath > = read_conversions,
101+ ( "conversions" / [ masp_epoch : MaspEpoch ] ) -> BTreeMap <AssetType , ConversionWithoutPath > = read_conversions,
102102
103103 // Conversion state access - read conversion
104104 ( "masp_reward_tokens" ) -> Vec <MaspTokenRewardData > = masp_reward_tokens,
@@ -211,6 +211,7 @@ where
211211/// Query to read the conversion state
212212fn read_conversions < D , H , V , T > (
213213 ctx : RequestCtx < ' _ , D , H , V , T > ,
214+ masp_epoch : MaspEpoch ,
214215) -> namada_storage:: Result < BTreeMap < AssetType , ConversionWithoutPath > >
215216where
216217 D : ' static + DB + for < ' iter > DBIter < ' iter > + Sync ,
@@ -222,6 +223,7 @@ where
222223 . conversion_state
223224 . assets
224225 . iter ( )
226+ . filter ( |& ( _, asset) | ( asset. epoch == masp_epoch) )
225227 . map ( |( & asset_type, asset) | {
226228 (
227229 asset_type,
0 commit comments