From cd15f4724fa0fbc70d87b63849b42b6084ee2237 Mon Sep 17 00:00:00 2001 From: Fuxing Loh <4266087+fuxingloh@users.noreply.github.com> Date: Fri, 20 Jan 2023 11:51:31 +0800 Subject: [PATCH] chore(ocean-api-client): remove deprecated RawTx.ts (#1992) #### What this PR does / why we need it: As per title. #### Which issue(s) does this PR fixes?: Fixes #1989 --- packages/ocean-api-client/src/apis/RawTx.ts | 22 --------------------- packages/ocean-api-client/src/index.ts | 19 ------------------ 2 files changed, 41 deletions(-) delete mode 100644 packages/ocean-api-client/src/apis/RawTx.ts diff --git a/packages/ocean-api-client/src/apis/RawTx.ts b/packages/ocean-api-client/src/apis/RawTx.ts deleted file mode 100644 index a81724fbfa..0000000000 --- a/packages/ocean-api-client/src/apis/RawTx.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { OceanApiClient } from '../' - -/** - * @deprecated removing support very soon - */ -export class RawTx { - constructor (private readonly api: OceanApiClient) { - } - - /** - * The current fee rate to submit a rawtx into the network. - * - * If fee rate cannot be estimated it will return a fixed rate of 0.00005000 - * This will max out at around 0.00001 DFI per average transaction (200vb). - * - * @param {number} confirmationTarget in blocks till fee get confirmed - * @return {Promise<number>} fee rate per KB - */ - async feeEstimate (confirmationTarget: number = 10): Promise<number> { - return await this.api.requestData('GET', `rawtx/fee/estimate?confirmationTarget=${confirmationTarget}`) - } -} diff --git a/packages/ocean-api-client/src/index.ts b/packages/ocean-api-client/src/index.ts index cf63fd48a9..0159535642 100644 --- a/packages/ocean-api-client/src/index.ts +++ b/packages/ocean-api-client/src/index.ts @@ -1,5 +1,3 @@ -export * from './apis/RawTx' - export * from './errors/ApiException' export * from './errors/ApiValidationException' export * from './errors/ClientException' @@ -7,20 +5,3 @@ export * from './errors/TimeoutException' export * from './ApiResponse' export * from './OceanApiClient' - -// TODO(fuxingloh): -// export * from './api/Fee' -// import { OceanApiClient } from '../OceanApiClient' -// -// export class Fee { -// constructor (private readonly client: OceanApiClient) { -// } -// -// /** -// * @param {number} confirmationTarget in blocks till fee get confirmed -// * @return {Promise<number>} fee rate per KB -// */ -// async estimate (confirmationTarget: number = 10): Promise<number> { -// return await this.client.requestData('GET', `fee/estimate?confirmationTarget=${confirmationTarget}`) -// } -// }