File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -589,22 +589,21 @@ impl<T: Config> OnDenominate<BalanceOf<T>> for DenominateXorAndTbcd<T> {
589589 fn on_denominate ( _factor : & BalanceOf < T > ) -> DispatchResult {
590590 frame_support:: log:: info!( "{}::on_denominate({})" , module_path!( ) , _factor) ;
591591
592- let clear_price_info = | asset_id : AssetIdOf < T > | {
592+ for asset_id in PriceInfos :: < T > :: iter_keys ( ) {
593593 PriceInfos :: < T > :: mutate ( asset_id, |price_info| {
594594 if let Some ( info) = price_info {
595595 * info = AggregatedPriceInfo :: default ( ) ;
596596 }
597597 } ) ;
598+ }
598599
599- FastPriceInfos :: < T > :: mutate ( asset_id, |fast_price_info| {
600- if let Some ( info) = fast_price_info {
600+ for asset_id in FastPriceInfos :: < T > :: iter_keys ( ) {
601+ FastPriceInfos :: < T > :: mutate ( asset_id, |price_info| {
602+ if let Some ( info) = price_info {
601603 * info = AggregatedPriceInfo :: default ( ) ;
602604 }
603605 } ) ;
604- } ;
605-
606- clear_price_info ( AssetIdOf :: < T > :: from ( XOR ) ) ;
607- clear_price_info ( AssetIdOf :: < T > :: from ( common:: TBCD ) ) ;
606+ }
608607
609608 Ok ( ( ) )
610609 }
You can’t perform that action at this time.
0 commit comments