From f4c1852b023d140f7d214f56ccb087f4fd778426 Mon Sep 17 00:00:00 2001 From: Marian Vanderka Date: Fri, 20 Nov 2020 15:40:41 +0100 Subject: [PATCH] changed weight for buy/sell with no pay --- pallets/xyk/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pallets/xyk/src/lib.rs b/pallets/xyk/src/lib.rs index 26726d054605d..d3550800ee6ea 100644 --- a/pallets/xyk/src/lib.rs +++ b/pallets/xyk/src/lib.rs @@ -10,6 +10,7 @@ use codec::{Decode, Encode}; use frame_support::{ decl_error, decl_event, decl_module, decl_storage, dispatch::DispatchResult, ensure, traits::Randomness, StorageMap, + weights::Pays, }; use pallet_assets as assets; @@ -146,7 +147,7 @@ decl_module! { } // you will sell your sold_asset_amount of sold_asset_id to get some amount of bought_asset_id - #[weight = 10_000] + #[weight = (10_000, Pays::No)] fn sell_asset ( origin, sold_asset_id: T::AssetId, @@ -194,7 +195,7 @@ decl_module! { Ok(()) } - #[weight = 10_000] + #[weight = (10_000, Pays::No)] fn buy_asset ( origin, sold_asset_id: T::AssetId,