From c00bb518b3111e88b595c663e8c72b7c55f727a0 Mon Sep 17 00:00:00 2001 From: Victor Yanev Date: Tue, 17 Dec 2024 16:12:01 +0200 Subject: [PATCH] fix: build error after rebase from `main` Signed-off-by: Victor Yanev --- packages/relay/src/lib/relay.ts | 3 --- .../src/lib/services/hapiService/hapiService.ts | 3 --- .../relay/src/lib/services/hbarLimitService/index.ts | 12 ++---------- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/packages/relay/src/lib/relay.ts b/packages/relay/src/lib/relay.ts index d7a618d064..a90feb34f4 100644 --- a/packages/relay/src/lib/relay.ts +++ b/packages/relay/src/lib/relay.ts @@ -164,9 +164,6 @@ export class RelayImpl implements Relay { const hapiService = new HAPIService(logger, register, this.cacheService, this.eventEmitter, hbarLimitService); this.clientMain = hapiService.getMainClientInstance(); - if (this.clientMain.operatorAccountId) { - hbarLimitService.setOperatorAddress(this.clientMain.operatorAccountId.toSolidityAddress()); - } this.web3Impl = new Web3Impl(this.clientMain); this.netImpl = new NetImpl(this.clientMain); diff --git a/packages/relay/src/lib/services/hapiService/hapiService.ts b/packages/relay/src/lib/services/hapiService/hapiService.ts index e1a8ef19ed..88fe3327c2 100644 --- a/packages/relay/src/lib/services/hapiService/hapiService.ts +++ b/packages/relay/src/lib/services/hapiService/hapiService.ts @@ -279,9 +279,6 @@ export default class HAPIService { this.clientMain = this.initClient(this.logger, this.hederaNetwork); this.client = this.initSDKClient(this.logger); this.resetCounters(); - if (this.clientMain.operatorAccountId) { - this.hbarLimitService.setOperatorAddress(this.clientMain.operatorAccountId.toSolidityAddress()); - } } /** diff --git a/packages/relay/src/lib/services/hbarLimitService/index.ts b/packages/relay/src/lib/services/hbarLimitService/index.ts index dcd6431420..71f3e4cfe5 100644 --- a/packages/relay/src/lib/services/hbarLimitService/index.ts +++ b/packages/relay/src/lib/services/hbarLimitService/index.ts @@ -1,8 +1,8 @@ -/* +/*- * * Hedera JSON RPC Relay * - * Copyright (C) 2022-2024 Hedera Hashgraph, LLC + * Copyright (C) 2024 Hedera Hashgraph, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -171,14 +171,6 @@ export class HbarLimitService implements IHbarLimitService { return this.isHBarRateLimiterEnabled; } - /** - * Sets the operator address for the rate limiter. Used for tracking operator expenses. - * @param {string} operatorAddress - The EVM address of the operator. - */ - setOperatorAddress(operatorAddress: string) { - this.operatorAddress = prepend0x(operatorAddress); - } - /** * Resets the {@link HbarSpendingPlan#amountSpent} field for all existing plans. * @param {RequestDetails} requestDetails - The request details used for logging and tracking.