aboutsummaryrefslogtreecommitdiffstats
path: root/packages/fill-scenarios
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-05-11 22:04:03 +0800
committerFabio Berger <me@fabioberger.com>2018-05-11 22:04:03 +0800
commit273d3445e46d45fc4fc1438148466e155bc380f3 (patch)
treef9c89457f6240c96c4235b2628d8f585369c9c64 /packages/fill-scenarios
parentbc3dc52377325d8b60a5227f0ec9bbdd413179f5 (diff)
downloaddexon-sol-tools-273d3445e46d45fc4fc1438148466e155bc380f3.tar
dexon-sol-tools-273d3445e46d45fc4fc1438148466e155bc380f3.tar.gz
dexon-sol-tools-273d3445e46d45fc4fc1438148466e155bc380f3.tar.bz2
dexon-sol-tools-273d3445e46d45fc4fc1438148466e155bc380f3.tar.lz
dexon-sol-tools-273d3445e46d45fc4fc1438148466e155bc380f3.tar.xz
dexon-sol-tools-273d3445e46d45fc4fc1438148466e155bc380f3.tar.zst
dexon-sol-tools-273d3445e46d45fc4fc1438148466e155bc380f3.zip
Revert throw conditions since it messes with the expected test timing
Diffstat (limited to 'packages/fill-scenarios')
-rw-r--r--packages/fill-scenarios/src/index.ts18
1 files changed, 3 insertions, 15 deletions
diff --git a/packages/fill-scenarios/src/index.ts b/packages/fill-scenarios/src/index.ts
index 8c7fa500e..9f1b68ef2 100644
--- a/packages/fill-scenarios/src/index.ts
+++ b/packages/fill-scenarios/src/index.ts
@@ -146,7 +146,7 @@ export class FillScenarios {
const [orderAddresses, orderValues] = formatters.getOrderAddressesAndValues(signedOrder);
- const txHash = await exchangeInstance.fillOrder.sendTransactionAsync(
+ await exchangeInstance.fillOrder.sendTransactionAsync(
orderAddresses,
orderValues,
partialFillAmount,
@@ -156,10 +156,6 @@ export class FillScenarios {
signedOrder.ecSignature.s,
{ from: takerAddress },
);
- const txReceipt = await this._web3Wrapper.awaitTransactionMinedAsync(txHash);
- if (txReceipt.status !== 1) {
- throw new Error(`FillOrder tx reverted. TxHash: ${txReceipt.transactionHash}`);
- }
return signedOrder;
}
private async _createAsymmetricFillableSignedOrderWithFeesAsync(
@@ -219,13 +215,9 @@ export class FillScenarios {
this._web3Wrapper.getProvider(),
this._web3Wrapper.getContractDefaults(),
);
- const txHash = await token.transfer.sendTransactionAsync(address, amount, {
+ await token.transfer.sendTransactionAsync(address, amount, {
from: this._coinbase,
});
- const txReceipt = await this._web3Wrapper.awaitTransactionMinedAsync(txHash);
- if (txReceipt.status !== 1) {
- throw new Error(`Transfer tx reverted. TxHash: ${txReceipt.transactionHash}`);
- }
}
private async _increaseAllowanceAsync(tokenAddress: string, address: string, amount: BigNumber): Promise<void> {
const tokenInstance = new TokenContract(
@@ -243,12 +235,8 @@ export class FillScenarios {
const oldMakerAllowance = await tokenInstance.allowance.callAsync(address, proxyAddress);
const newMakerAllowance = oldMakerAllowance.plus(amount);
- const txHash = await tokenInstance.approve.sendTransactionAsync(proxyAddress, newMakerAllowance, {
+ await tokenInstance.approve.sendTransactionAsync(proxyAddress, newMakerAllowance, {
from: address,
});
- const txReceipt = await this._web3Wrapper.awaitTransactionMinedAsync(txHash);
- if (txReceipt.status !== 1) {
- throw new Error(`Approve tx reverted. TxHash: ${txReceipt.transactionHash}`);
- }
}
}