aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-01-23 05:19:29 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-01-30 23:01:36 +0800
commita17091b394400ae13b7f85632b2c4a2e20935442 (patch)
tree217cef1998de9e6730431442cae6a3aacd456778 /packages
parented77c6cb544e9d7e663e672b1190806a7302cf17 (diff)
downloaddexon-sol-tools-a17091b394400ae13b7f85632b2c4a2e20935442.tar
dexon-sol-tools-a17091b394400ae13b7f85632b2c4a2e20935442.tar.gz
dexon-sol-tools-a17091b394400ae13b7f85632b2c4a2e20935442.tar.bz2
dexon-sol-tools-a17091b394400ae13b7f85632b2c4a2e20935442.tar.lz
dexon-sol-tools-a17091b394400ae13b7f85632b2c4a2e20935442.tar.xz
dexon-sol-tools-a17091b394400ae13b7f85632b2c4a2e20935442.tar.zst
dexon-sol-tools-a17091b394400ae13b7f85632b2c4a2e20935442.zip
Make awaitTransactionMinedAsync non-generic again
Diffstat (limited to 'packages')
-rw-r--r--packages/0x.js/src/0x.ts8
-rw-r--r--packages/contracts/util/exchange_wrapper.ts14
-rw-r--r--packages/types/src/index.ts4
3 files changed, 13 insertions, 13 deletions
diff --git a/packages/0x.js/src/0x.ts b/packages/0x.js/src/0x.ts
index 8eb8cdd9a..6cfa65cc2 100644
--- a/packages/0x.js/src/0x.ts
+++ b/packages/0x.js/src/0x.ts
@@ -285,18 +285,18 @@ export class ZeroEx {
* @param timeoutMs How long (in ms) to poll for transaction mined until aborting.
* @return Transaction receipt with decoded log args.
*/
- public async awaitTransactionMinedAsync<ArgsType>(
+ public async awaitTransactionMinedAsync(
txHash: string,
pollingIntervalMs = 1000,
timeoutMs?: number,
- ): Promise<TransactionReceiptWithDecodedLogs<ArgsType>> {
+ ): Promise<TransactionReceiptWithDecodedLogs> {
let timeoutExceeded = false;
if (timeoutMs) {
setTimeout(() => (timeoutExceeded = true), timeoutMs);
}
const txReceiptPromise = new Promise(
- (resolve: (receipt: TransactionReceiptWithDecodedLogs<ArgsType>) => void, reject) => {
+ (resolve: (receipt: TransactionReceiptWithDecodedLogs) => void, reject) => {
const intervalId = intervalUtils.setAsyncExcludingInterval(
async () => {
if (timeoutExceeded) {
@@ -311,7 +311,7 @@ export class ZeroEx {
transactionReceipt.logs,
this._abiDecoder.tryToDecodeLogOrNoop.bind(this._abiDecoder),
);
- const transactionReceiptWithDecodedLogArgs: TransactionReceiptWithDecodedLogs<ArgsType> = {
+ const transactionReceiptWithDecodedLogArgs: TransactionReceiptWithDecodedLogs = {
...transactionReceipt,
logs: logsWithDecodedArgs,
};
diff --git a/packages/contracts/util/exchange_wrapper.ts b/packages/contracts/util/exchange_wrapper.ts
index 2e10cd673..84123c5f4 100644
--- a/packages/contracts/util/exchange_wrapper.ts
+++ b/packages/contracts/util/exchange_wrapper.ts
@@ -20,7 +20,7 @@ export class ExchangeWrapper {
fillTakerTokenAmount?: BigNumber;
shouldThrowOnInsufficientBalanceOrAllowance?: boolean;
} = {},
- ): Promise<TransactionReceiptWithDecodedLogs<ExchangeContractEventArgs>> {
+ ): Promise<TransactionReceiptWithDecodedLogs> {
const shouldThrowOnInsufficientBalanceOrAllowance = !!opts.shouldThrowOnInsufficientBalanceOrAllowance;
const params = order.createFill(shouldThrowOnInsufficientBalanceOrAllowance, opts.fillTakerTokenAmount);
const txHash = await this._exchange.fillOrder(
@@ -42,7 +42,7 @@ export class ExchangeWrapper {
order: Order,
from: string,
opts: { cancelTakerTokenAmount?: BigNumber } = {},
- ): Promise<TransactionReceiptWithDecodedLogs<ExchangeContractEventArgs>> {
+ ): Promise<TransactionReceiptWithDecodedLogs> {
const params = order.createCancel(opts.cancelTakerTokenAmount);
const txHash = await this._exchange.cancelOrder(
params.orderAddresses,
@@ -59,7 +59,7 @@ export class ExchangeWrapper {
order: Order,
from: string,
opts: { fillTakerTokenAmount?: BigNumber } = {},
- ): Promise<TransactionReceiptWithDecodedLogs<ExchangeContractEventArgs>> {
+ ): Promise<TransactionReceiptWithDecodedLogs> {
const shouldThrowOnInsufficientBalanceOrAllowance = true;
const params = order.createFill(shouldThrowOnInsufficientBalanceOrAllowance, opts.fillTakerTokenAmount);
const txHash = await this._exchange.fillOrKillOrder(
@@ -83,7 +83,7 @@ export class ExchangeWrapper {
fillTakerTokenAmounts?: BigNumber[];
shouldThrowOnInsufficientBalanceOrAllowance?: boolean;
} = {},
- ): Promise<TransactionReceiptWithDecodedLogs<ExchangeContractEventArgs>> {
+ ): Promise<TransactionReceiptWithDecodedLogs> {
const shouldThrowOnInsufficientBalanceOrAllowance = !!opts.shouldThrowOnInsufficientBalanceOrAllowance;
const params = formatters.createBatchFill(
orders,
@@ -109,7 +109,7 @@ export class ExchangeWrapper {
orders: Order[],
from: string,
opts: { fillTakerTokenAmounts?: BigNumber[] } = {},
- ): Promise<TransactionReceiptWithDecodedLogs<ExchangeContractEventArgs>> {
+ ): Promise<TransactionReceiptWithDecodedLogs> {
const params = formatters.createBatchFill(orders, undefined, opts.fillTakerTokenAmounts);
const txHash = await this._exchange.batchFillOrKillOrders(
params.orderAddresses,
@@ -132,7 +132,7 @@ export class ExchangeWrapper {
fillTakerTokenAmount?: BigNumber;
shouldThrowOnInsufficientBalanceOrAllowance?: boolean;
} = {},
- ): Promise<TransactionReceiptWithDecodedLogs<ExchangeContractEventArgs>> {
+ ): Promise<TransactionReceiptWithDecodedLogs> {
const shouldThrowOnInsufficientBalanceOrAllowance = !!opts.shouldThrowOnInsufficientBalanceOrAllowance;
const params = formatters.createFillUpTo(
orders,
@@ -158,7 +158,7 @@ export class ExchangeWrapper {
orders: Order[],
from: string,
opts: { cancelTakerTokenAmounts?: BigNumber[] } = {},
- ): Promise<TransactionReceiptWithDecodedLogs<ExchangeContractEventArgs>> {
+ ): Promise<TransactionReceiptWithDecodedLogs> {
const params = formatters.createBatchCancel(orders, opts.cancelTakerTokenAmounts);
const txHash = await this._exchange.batchCancelOrders(
params.orderAddresses,
diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts
index 0e409c93d..7b53b52c4 100644
--- a/packages/types/src/index.ts
+++ b/packages/types/src/index.ts
@@ -53,6 +53,6 @@ export enum SolidityTypes {
Uint = 'uint',
}
-export interface TransactionReceiptWithDecodedLogs<ArgsType> extends TransactionReceipt {
- logs: Array<LogWithDecodedArgs<ArgsType> | Web3.LogEntry>;
+export interface TransactionReceiptWithDecodedLogs extends TransactionReceipt {
+ logs: Array<LogWithDecodedArgs<DecodedLogArgs> | Web3.LogEntry>;
}