Skip to content

Commit

Permalink
Merge pull request #8 from gleb-urvanov/feature/no-fees
Browse files Browse the repository at this point in the history
changed weight for buy/sell with no pay
  • Loading branch information
gleb-urvanov authored Nov 24, 2020
2 parents 3175b0d + f4c1852 commit 7845f91
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pallets/xyk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -194,7 +195,7 @@ decl_module! {
Ok(())
}

#[weight = 10_000]
#[weight = (10_000, Pays::No)]
fn buy_asset (
origin,
sold_asset_id: T::AssetId,
Expand Down

0 comments on commit 7845f91

Please sign in to comment.