@@ -98,7 +98,7 @@ router! {SHELL,
98
98
( "conv" / [ asset_type: AssetType ] ) -> Option <Conversion > = read_conversion,
99
99
100
100
// Conversion state access - read conversion
101
- ( "conversions" ) -> BTreeMap <AssetType , ConversionWithoutPath > = read_conversions,
101
+ ( "conversions" / [ masp_epoch : MaspEpoch ] ) -> BTreeMap <AssetType , ConversionWithoutPath > = read_conversions,
102
102
103
103
// Conversion state access - read conversion
104
104
( "masp_reward_tokens" ) -> Vec <MaspTokenRewardData > = masp_reward_tokens,
@@ -211,6 +211,7 @@ where
211
211
/// Query to read the conversion state
212
212
fn read_conversions < D , H , V , T > (
213
213
ctx : RequestCtx < ' _ , D , H , V , T > ,
214
+ masp_epoch : MaspEpoch ,
214
215
) -> namada_storage:: Result < BTreeMap < AssetType , ConversionWithoutPath > >
215
216
where
216
217
D : ' static + DB + for < ' iter > DBIter < ' iter > + Sync ,
@@ -222,6 +223,7 @@ where
222
223
. conversion_state
223
224
. assets
224
225
. iter ( )
226
+ . filter ( |& ( _, asset) | ( asset. epoch == masp_epoch) )
225
227
. map ( |( & asset_type, asset) | {
226
228
(
227
229
asset_type,
0 commit comments