Skip to content

Commit

Permalink
fix: Restored class comments and corrected HBAR_SPENDING_PLAN_CONFIG.
Browse files Browse the repository at this point in the history
Signed-off-by: ebadiere <[email protected]>
  • Loading branch information
ebadiere committed Oct 31, 2024
1 parent 0c80825 commit d1abc7b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/relay/src/lib/config/hbarSpendingPlanConfigService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ import { SubscriptionTier } from '../db/types/hbarLimiter/subscriptionTier';
import { IDetailedHbarSpendingPlan } from '../db/types/hbarLimiter/hbarSpendingPlan';
import { ConfigService } from '@hashgraph/json-rpc-config-service/dist/services';

/**
* Service for managing pre-configured {@link HbarSpendingPlan} entities.
*
* It reads the pre-configured spending plans from a JSON file and populates the cache with them.
*
* @see SpendingPlanConfig
* @see SPENDING_PLANS_CONFIG
*/
export class HbarSpendingPlanConfigService {
/**
* The time-to-live (TTL) for the pre-configured spending plans in the cache.
Expand Down Expand Up @@ -328,7 +336,7 @@ export class HbarSpendingPlanConfigService {
/**
* Deletes obsolete ETH address associations from the cache.
*
* For example, if an ETH address is associated with a plan different from the one in the {@link SPENDING_PLANS_CONFIG_FILE},
* For example, if an ETH address is associated with a plan different from the one in the {@link SPENDING_PLANS_CONFIG},
* the association is deleted from the cache to allow the new association from the configuration file to take effect.
*
* @param {SpendingPlanConfig} planConfig - The spending plan configuration.
Expand Down Expand Up @@ -356,7 +364,7 @@ export class HbarSpendingPlanConfigService {
/**
* Deletes obsolete IP address associations from the cache.
*
* For example, if an IP address is associated with a plan different from the one in the {@link SPENDING_PLANS_CONFIG_FILE},
* For example, if an IP address is associated with a plan different from the one in the {@link SPENDING_PLANS_CONFIG},
* the association is deleted from the cache to allow the new association from the configuration file to take effect.
*
* @param {SpendingPlanConfig} planConfig - The spending plan configuration.
Expand Down

0 comments on commit d1abc7b

Please sign in to comment.