From 8bf7da3866f00851438855118e4d1883b58fb4da Mon Sep 17 00:00:00 2001 From: cr4pt0 Date: Fri, 3 Mar 2023 12:45:50 +0000 Subject: [PATCH] zero fees for set_updated_coin_infos extrinsic if success --- pallets/dia-oracle/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pallets/dia-oracle/src/lib.rs b/pallets/dia-oracle/src/lib.rs index 9750b36..0f93f02 100644 --- a/pallets/dia-oracle/src/lib.rs +++ b/pallets/dia-oracle/src/lib.rs @@ -375,14 +375,14 @@ pub mod pallet { pub fn set_updated_coin_infos( origin: OriginFor, coin_infos: Vec<((Vec, Vec), CoinInfo)>, - ) -> DispatchResult { + ) -> DispatchResultWithPostInfo { let origin_account_id = ensure_signed(origin)?; Pallet::::check_origin_rights(&origin_account_id)?; Self::deposit_event(Event::::UpdatedPrices(coin_infos.clone())); for ((blockchain, symbol), c) in coin_infos { >::insert(AssetId { blockchain, symbol }, c); } - Ok(()) + Ok(Pays::No.into()) } #[pallet::weight(::WeightInfo::set_batching_api())]