From 9c7ea98fce1a84807b40787318300bb941ffc1a1 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Tue, 1 Sep 2020 00:27:33 -0700 Subject: [PATCH] use TransactionReceipt --- src/exchange/FixedRateExchange.ts | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/exchange/FixedRateExchange.ts b/src/exchange/FixedRateExchange.ts index c8cb15a6..fde5f405 100644 --- a/src/exchange/FixedRateExchange.ts +++ b/src/exchange/FixedRateExchange.ts @@ -1,5 +1,6 @@ import defaultFixedRateExchangeABI from '@oceanprotocol/contracts/artifacts/FixedRateExchange.json' import BigNumber from 'bignumber.js' +import { TransactionReceipt } from 'web3-core' export interface FixedPricedExchange { exchangeID?: string @@ -93,13 +94,13 @@ export class OceanFixedRateExchange { * @param {String} exchangeId ExchangeId * @param {Number} dataTokenAmount Amount of Data Tokens * @param {String} address User address - * @return {Promise} transaction receipt + * @return {Promise} transaction receipt */ public async buyDT( exchangeId: string, dataTokenAmount: string, address: string - ): Promise { + ): Promise { let estGas try { estGas = await this.contract.methods @@ -144,13 +145,13 @@ export class OceanFixedRateExchange { * @param {String} exchangeId ExchangeId * @param {Number} newRate New rate * @param {String} address User account - * @return {Promise} transaction receipt + * @return {Promise} transaction receipt */ public async setRate( exchangeId: string, newRate: number, address: string - ): Promise { + ): Promise { let estGas try { estGas = await this.contract.methods @@ -178,9 +179,12 @@ export class OceanFixedRateExchange { * Activate an exchange * @param {String} exchangeId ExchangeId * @param {String} address User address - * @return {Promise} transaction receipt + * @return {Promise} transaction receipt */ - public async activate(exchangeId: string, address: string): Promise { + public async activate( + exchangeId: string, + address: string + ): Promise { let estGas try { estGas = await this.contract.methods @@ -206,9 +210,12 @@ export class OceanFixedRateExchange { * Deactivate an exchange * @param {String} exchangeId ExchangeId * @param {String} address User address - * @return {Promise} transaction receipt + * @return {Promise} transaction receipt */ - public async deactivate(exchangeId: string, address: string): Promise { + public async deactivate( + exchangeId: string, + address: string + ): Promise { let estGas try { estGas = await this.contract.methods