Skip to content

Commit

Permalink
chore: fix code smells
Browse files Browse the repository at this point in the history
Signed-off-by: nikolay <n.atanasow94@gmail.com>
  • Loading branch information
natanasow committed Oct 22, 2024
1 parent 73f918a commit 233d0cb
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions packages/relay/tests/lib/openrpc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,16 @@

import { ConfigService } from '@hashgraph/json-rpc-config-service/dist/services';
import Ajv from 'ajv';
import path from 'path';
import pino from 'pino';
import Long from 'long';
import axios from 'axios';
import sinon from 'sinon';
import dotenv from 'dotenv';
import { expect } from 'chai';
import EventEmitter from 'events';
import { AccountInfo, Hbar } from '@hashgraph/sdk';
import MockAdapter from 'axios-mock-adapter';
import { Registry } from 'prom-client';
import { BigNumber } from 'bignumber.js';
import { EthImpl } from '../../src/lib/eth';
import MockAdapter from 'axios-mock-adapter';
import constants from '../../src/lib/constants';
import { RelayImpl } from '../../src/lib/relay';
import { register, Registry } from 'prom-client';
Expand Down
1 change: 0 additions & 1 deletion packages/relay/tests/lib/sdkClient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import constants from '../../src/lib/constants';
import { register, Registry } from 'prom-client';
import { RequestDetails } from '../../src/lib/types';
import { formatTransactionId } from '../../src/formatters';
import { predefined } from '../../src/lib/errors/JsonRpcError';
import { MirrorNodeClient, SDKClient } from '../../src/lib/clients';
import HAPIService from '../../src/lib/services/hapiService/hapiService';
import { HbarLimitService } from '../../src/lib/services/hbarLimitService';
Expand Down
3 changes: 2 additions & 1 deletion packages/relay/tests/lib/utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { Utils } from '../../src/utils';
import constants from '../../src/lib/constants';
import { overrideEnvsInMochaDescribe } from '../helpers';
import { estimateFileTransactionsFee } from '../helpers';
import { ConfigService } from '@hashgraph/json-rpc-config-service/dist/services';

describe('Utils', () => {
describe('addPercentageBufferToGasPrice', () => {
Expand Down Expand Up @@ -55,7 +56,7 @@ describe('Utils', () => {
describe('estimateFileTransactionsFee', () => {
const callDataSize = 6000;
const mockedExchangeRateInCents: number = 12;
const fileChunkSize = Number(process.env.FILE_APPEND_CHUNK_SIZE) || 5120;
const fileChunkSize = Number(ConfigService.get('FILE_APPEND_CHUNK_SIZE')) || 5120;
it('Should execute estimateFileTransactionFee() to estimate total fee of file transactions', async () => {
const result = Utils.estimateFileTransactionsFee(callDataSize, fileChunkSize, mockedExchangeRateInCents);
const expectedResult = estimateFileTransactionsFee(callDataSize, fileChunkSize, mockedExchangeRateInCents);
Expand Down

0 comments on commit 233d0cb

Please sign in to comment.