From 89b83221ded406b583983883d57020d7e438a241 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Wed, 17 Aug 2022 15:14:54 +0300 Subject: [PATCH] cleanups and warnings --- src/services/Aquarius.ts | 4 ++-- src/services/Provider.ts | 4 ++-- src/utils/ContractUtils.ts | 2 +- src/utils/TokenUtils.ts | 1 - test/unit/FixedRateExchange.test.ts | 2 -- test/unit/NftFactory.test.ts | 1 - 6 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/services/Aquarius.ts b/src/services/Aquarius.ts index 4e122ef8..2e27cae5 100644 --- a/src/services/Aquarius.ts +++ b/src/services/Aquarius.ts @@ -142,7 +142,7 @@ export class Aquarius { headers: { 'Content-Type': 'application/json' }, - signal: signal + signal }) if (response.ok) { @@ -174,7 +174,7 @@ export class Aquarius { headers: { 'Content-Type': 'application/json' }, - signal: signal + signal }) if (response.ok) { diff --git a/src/services/Provider.ts b/src/services/Provider.ts index bd8d4c23..b8f17301 100644 --- a/src/services/Provider.ts +++ b/src/services/Provider.ts @@ -163,7 +163,7 @@ export class Provider { providerUri, providerEndpoints ) - const args = { did: did, serviceId: serviceId, checksum: withChecksum } + const args = { did, serviceId, checksum: withChecksum } const files: FileInfo[] = [] const path = this.getEndpointURL(serviceEndpoints, 'fileinfo') ? this.getEndpointURL(serviceEndpoints, 'fileinfo').urlPath @@ -203,7 +203,7 @@ export class Provider { providerUri, providerEndpoints ) - const args = { url: url, type: 'url' } + const args = { url, type: 'url' } const files: FileInfo[] = [] const path = this.getEndpointURL(serviceEndpoints, 'fileinfo') ? this.getEndpointURL(serviceEndpoints, 'fileinfo').urlPath diff --git a/src/utils/ContractUtils.ts b/src/utils/ContractUtils.ts index a8be9ff5..6b940fac 100644 --- a/src/utils/ContractUtils.ts +++ b/src/utils/ContractUtils.ts @@ -110,7 +110,7 @@ export async function sendTx( ...args: any[] ): Promise { const sendTxValue: Record = { - from: from, + from, gas: estGas + 1 } try { diff --git a/src/utils/TokenUtils.ts b/src/utils/TokenUtils.ts index 38748d55..8e8067c6 100644 --- a/src/utils/TokenUtils.ts +++ b/src/utils/TokenUtils.ts @@ -5,7 +5,6 @@ import BigNumber from 'bignumber.js' import { amountToUnits, calculateEstimatedGas, - getFairGasPrice, unitsToAmount, minAbi, sendTx, diff --git a/test/unit/FixedRateExchange.test.ts b/test/unit/FixedRateExchange.test.ts index 1fcbb9e2..cdf46716 100644 --- a/test/unit/FixedRateExchange.test.ts +++ b/test/unit/FixedRateExchange.test.ts @@ -15,7 +15,6 @@ import { Datatoken } from '../../src' import { FreCreationParams, DatatokenCreateParams } from '../../src/@types' -import { Contract } from 'web3-eth-contract' describe('Fixed Rate unit test', () => { let factoryOwner: string @@ -26,7 +25,6 @@ describe('Fixed Rate unit test', () => { let contracts: Addresses let fixedRate: FixedRateExchange let dtAddress: string - let dtContract: Contract let config: Config const nftData: NftCreateData = { diff --git a/test/unit/NftFactory.test.ts b/test/unit/NftFactory.test.ts index ceada55b..9b885752 100644 --- a/test/unit/NftFactory.test.ts +++ b/test/unit/NftFactory.test.ts @@ -8,7 +8,6 @@ import { ZERO_ADDRESS, signHash, Nft, - transfer, approve, Config, balance,