From b298412e35fec5172dee23423b280b9681286f1a Mon Sep 17 00:00:00 2001 From: kilavvy <140459108+kilavvy@users.noreply.github.com> Date: Fri, 31 Jan 2025 17:23:07 +0100 Subject: [PATCH 1/2] Update lib.rs --- modules/incentives/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/incentives/src/lib.rs b/modules/incentives/src/lib.rs index 5aae740..0807d99 100644 --- a/modules/incentives/src/lib.rs +++ b/modules/incentives/src/lib.rs @@ -136,7 +136,7 @@ impl Module { impl RewardHandler for Module where T::BlockNumber: SaturatedConversion, { - fn caculate_reward(pool_id: &PoolId, + fn calculate_reward(pool_id: &PoolId, total_share: &Share, last_update_block: T::BlockNumber, now: T::BlockNumber) -> Balance { From 1a49b066a72a6060f9d40cc28a5e5691c553d957 Mon Sep 17 00:00:00 2001 From: kilavvy <140459108+kilavvy@users.noreply.github.com> Date: Fri, 31 Jan 2025 17:24:03 +0100 Subject: [PATCH 2/2] Update lib.rs --- modules/incentives/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/incentives/src/lib.rs b/modules/incentives/src/lib.rs index 0807d99..b0c5c50 100644 --- a/modules/incentives/src/lib.rs +++ b/modules/incentives/src/lib.rs @@ -185,9 +185,9 @@ impl IncentiveOps for Module } } - fn get_accumlated_rewards(who: &T::AccountId, left: &CurrencyId, right: &CurrencyId) -> Share { + fn get_accumulated_rewards(who: &T::AccountId, left: &CurrencyId, right: &CurrencyId) -> Share { if let Ok(id) = Self::get_dex_id(left, right) { - T::RewardPool::get_accumlated_rewards(who, &id) + T::RewardPool::get_accumulated_rewards(who, &id) } else { Zero::zero() } @@ -196,10 +196,10 @@ impl IncentiveOps for Module fn get_account_info(who: &T::AccountId, left: &CurrencyId, right: &CurrencyId) -> IncentivePoolAccountInfo { if let Ok(pool_id) = Self::get_dex_id(left, right) { let shares = T::RewardPool::get_account_shares(who, &pool_id); - let accumlated_rewards = T::RewardPool::get_accumlated_rewards(who, &pool_id); - IncentivePoolAccountInfo { shares, accumlated_rewards, } + let accumulated_rewards = T::RewardPool::get_accumulated_rewards(who, &pool_id); + IncentivePoolAccountInfo { shares, accumulated_rewards, } } else { - IncentivePoolAccountInfo { shares: Zero::zero(), accumlated_rewards: Zero::zero(), } + IncentivePoolAccountInfo { shares: Zero::zero(), accumulated_rewards: Zero::zero(), } } }