aboutsummaryrefslogtreecommitdiffstats
path: root/src/0x.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-09-05 16:29:51 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-09-05 16:29:51 +0800
commit96d2a55effa6666c1b8d90594ca5607dcc1bce8e (patch)
treef5acb14ac5f80c64d5690c0de8e13ea52285ee61 /src/0x.ts
parent5d57a2f0e958fb36edcbe1ddfd7520406e615195 (diff)
downloaddexon-sol-tools-96d2a55effa6666c1b8d90594ca5607dcc1bce8e.tar
dexon-sol-tools-96d2a55effa6666c1b8d90594ca5607dcc1bce8e.tar.gz
dexon-sol-tools-96d2a55effa6666c1b8d90594ca5607dcc1bce8e.tar.bz2
dexon-sol-tools-96d2a55effa6666c1b8d90594ca5607dcc1bce8e.tar.lz
dexon-sol-tools-96d2a55effa6666c1b8d90594ca5607dcc1bce8e.tar.xz
dexon-sol-tools-96d2a55effa6666c1b8d90594ca5607dcc1bce8e.tar.zst
dexon-sol-tools-96d2a55effa6666c1b8d90594ca5607dcc1bce8e.zip
Add TransationReceipt as a public exported type
Diffstat (limited to 'src/0x.ts')
-rw-r--r--src/0x.ts12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/0x.ts b/src/0x.ts
index 4a1d605a2..86976c4ab 100644
--- a/src/0x.ts
+++ b/src/0x.ts
@@ -16,7 +16,7 @@ import {TokenRegistryWrapper} from './contract_wrappers/token_registry_wrapper';
import {EtherTokenWrapper} from './contract_wrappers/ether_token_wrapper';
import {TokenWrapper} from './contract_wrappers/token_wrapper';
import {TokenTransferProxyWrapper} from './contract_wrappers/token_transfer_proxy_wrapper';
-import {ECSignature, ZeroExError, Order, SignedOrder, Web3Provider, ZeroExConfig} from './types';
+import {ECSignature, ZeroExError, Order, SignedOrder, Web3Provider, ZeroExConfig, TransactionReceipt} from './types';
// Customize our BigNumber instances
bigNumberConfigs.configure();
@@ -249,9 +249,15 @@ export class ZeroEx {
throw new Error(ZeroExError.InvalidSignature);
}
+ /**
+ * Waits for transaction to be mined and returns the transaction receipt
+ * @param txHash Transaction hash
+ * @param pollingIntervalMs How often (in ms) should we check if the transaction is mined.
+ * @return Web3.TransactionReceipt
+ */
public async awaitTransactionMinedAsync(txHash: string,
- pollingIntervalMs: number = 500): Promise<Web3.TransactionReceipt> {
- const txReceiptPromise = new Promise((resolve: (receipt: Web3.TransactionReceipt) => void, reject) => {
+ pollingIntervalMs: number = 500): Promise<TransactionReceipt> {
+ const txReceiptPromise = new Promise((resolve: (receipt: TransactionReceipt) => void, reject) => {
const intervalId = setInterval(async () => {
const transactionReceipt = await this._web3Wrapper.getTransactionReceiptAsync(txHash);
if (!_.isNull(transactionReceipt)) {