From 6686586b8cbaa69776b49a9412629846838b9b84 Mon Sep 17 00:00:00 2001 From: Elias Rad <146735585+nnsW3@users.noreply.github.com> Date: Tue, 2 Jul 2024 23:15:26 +0300 Subject: [PATCH 1/5] fix __DexName__-e2e.test.ts.template --- dex-template/__DexName__-e2e.test.ts.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dex-template/__DexName__-e2e.test.ts.template b/dex-template/__DexName__-e2e.test.ts.template index a11734126..1c8194a0d 100644 --- a/dex-template/__DexName__-e2e.test.ts.template +++ b/dex-template/__DexName__-e2e.test.ts.template @@ -34,7 +34,7 @@ import { generateConfig } from '../../config'; Tokens or Holders map, you can update the './tests/constants-e2e' Other than the standard cases that are already added by the template - it is highly recommended to add test cases which could be specific + it is highly recommended to add test cases that could be specific to testing __DexName__ (Eg. Tests based on poolType, special tokens, etc). From f4845819c06fe681407a84e392f1cfc4e77d870d Mon Sep 17 00:00:00 2001 From: Elias Rad <146735585+nnsW3@users.noreply.github.com> Date: Tue, 2 Jul 2024 23:18:02 +0300 Subject: [PATCH 2/5] fix __DexName__.ts.template --- dex-template/__DexName__.ts.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dex-template/__DexName__.ts.template b/dex-template/__DexName__.ts.template index 4ba5e1d05..10a1ab011 100644 --- a/dex-template/__DexName__.ts.template +++ b/dex-template/__DexName__.ts.template @@ -148,7 +148,7 @@ export class __DexName__ return []; } - // This is optional function in case if your implementation has acquired any resources + // This is an optional function in case if your implementation has acquired any resources // you need to release for graceful shutdown. For example, it may be any interval timer releaseResources(): AsyncOrSync { // TODO: complete me! From 395316428238663fcbc696f5a3de0cee5b862559 Mon Sep 17 00:00:00 2001 From: Elias Rad <146735585+nnsW3@users.noreply.github.com> Date: Tue, 2 Jul 2024 23:19:18 +0300 Subject: [PATCH 3/5] fix iblock-manager.ts --- src/dex-helper/iblock-manager.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dex-helper/iblock-manager.ts b/src/dex-helper/iblock-manager.ts index dd3d87aa8..eafc6d708 100644 --- a/src/dex-helper/iblock-manager.ts +++ b/src/dex-helper/iblock-manager.ts @@ -12,7 +12,7 @@ export interface EventSubscriber { //implementers must not present states older than the latest/requested block //number to any query. //If isTracking() returns true, it is assumed that all logs up to the latest - //block have been processed, hence it is fine to return the last calculated + //block has been processed, hence it is fine to return the last calculated //state. isTracking: () => boolean; @@ -32,7 +32,7 @@ export interface EventSubscriber { blockNumberForMissingStateRegen?: number, ): AsyncOrSync; - //Will be called on a chain reorganisation prior to updating with new logs. + //Will be called on a chain reorganization prior to updating with new logs. //All state corresponding to blocks after the given number must be discarded, //except for the most recent state, if the invalid flag isn't still set. rollback(blockNumber: number): void; From 575390437d3b2a61c22e633426bc64fd5711368b Mon Sep 17 00:00:00 2001 From: Elias Rad <146735585+nnsW3@users.noreply.github.com> Date: Tue, 2 Jul 2024 23:21:01 +0300 Subject: [PATCH 4/5] fix state-polling-manager.ts --- src/lib/stateful-rpc-poller/state-polling-manager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/stateful-rpc-poller/state-polling-manager.ts b/src/lib/stateful-rpc-poller/state-polling-manager.ts index 85367d7a6..edd11d914 100644 --- a/src/lib/stateful-rpc-poller/state-polling-manager.ts +++ b/src/lib/stateful-rpc-poller/state-polling-manager.ts @@ -35,7 +35,7 @@ export class StatePollingManager { // This pools will be updated if we see new block and the time has come private _poolsToBeUpdated: Set = new Set(); - // This pools wont be updated before we change _isStateToBeUpdated to true + // This pools won't be updated before we change _isStateToBeUpdated to true private _idlePools: Set = new Set(); private constructor(protected dexHelper: IDexHelper) { From 8d86dc807819d97a681f5441d01c2ced62612798 Mon Sep 17 00:00:00 2001 From: Elias Rad <146735585+nnsW3@users.noreply.github.com> Date: Tue, 2 Jul 2024 23:22:13 +0300 Subject: [PATCH 5/5] fix stateful-rpc-poller.ts --- src/lib/stateful-rpc-poller/stateful-rpc-poller.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/stateful-rpc-poller/stateful-rpc-poller.ts b/src/lib/stateful-rpc-poller/stateful-rpc-poller.ts index 5ee1ee6ff..8d1e32e2e 100644 --- a/src/lib/stateful-rpc-poller/stateful-rpc-poller.ts +++ b/src/lib/stateful-rpc-poller/stateful-rpc-poller.ts @@ -73,7 +73,7 @@ export abstract class StatefulRpcPoller // Derived classes should not set these directly, and instead use setState() protected _stateWithUpdateInfo?: ObjWithUpdateInfo; - // This values is used to determine if current pool will participate in update or not + // This values is used to determine if the current pool will participate in update or not // We don't want to keep track of state for pools without liquidity protected _liquidityInUSDWithUpdateInfo: ObjWithUpdateInfo = { value: 0, @@ -142,7 +142,7 @@ export abstract class StatefulRpcPoller protected liquidityUpdatePeriodMs = DEFAULT_LIQUIDITY_UPDATE_PERIOD_MS, ) { // Don't make it too custom, like adding poolIdentifier. It will break log suppressor - // If we are really need to do that, update log Suppressor to handle that case + // If we really need to do that, update log Suppressor to handle that case // The idea is to have one entity name per Dex level, not pool level this.entityName = `StatefulPoller-${this.dexKey}-${this.dexHelper.config.data.network}`;