This commit is contained in:
Fabio Berger
2017-06-26 10:30:09 -07:00
parent 60b3f3e6dd
commit 0f413febd3
3 changed files with 3 additions and 3 deletions

View File

@@ -50,7 +50,7 @@ export class EtherTokenWrapper extends ContractWrapper {
const wethContractAddress = await this.getContractAddressAsync(); const wethContractAddress = await this.getContractAddressAsync();
const WETHBalanceInBaseUnits = await this._tokenWrapper.getBalanceAsync(wethContractAddress, withdrawer); const WETHBalanceInBaseUnits = await this._tokenWrapper.getBalanceAsync(wethContractAddress, withdrawer);
assert.assert(WETHBalanceInBaseUnits.gte(amountInWei), ZeroExError.INSUFFICIENT_WETH_BALANCE_FOR_WITHDRAWL); assert.assert(WETHBalanceInBaseUnits.gte(amountInWei), ZeroExError.INSUFFICIENT_WETH_BALANCE_FOR_WITHDRAWAL);
const wethContract = await this._getEtherTokenContractAsync(); const wethContract = await this._getEtherTokenContractAsync();
await wethContract.withdraw(amountInWei, { await wethContract.withdraw(amountInWei, {

View File

@@ -20,7 +20,7 @@ export const ZeroExError = strEnum([
'INSUFFICIENT_ALLOWANCE_FOR_TRANSFER', 'INSUFFICIENT_ALLOWANCE_FOR_TRANSFER',
'INSUFFICIENT_BALANCE_FOR_TRANSFER', 'INSUFFICIENT_BALANCE_FOR_TRANSFER',
'INSUFFICIENT_ETH_BALANCE_FOR_DEPOSIT', 'INSUFFICIENT_ETH_BALANCE_FOR_DEPOSIT',
'INSUFFICIENT_WETH_BALANCE_FOR_WITHDRAWL', 'INSUFFICIENT_WETH_BALANCE_FOR_WITHDRAWAL',
'INVALID_JUMP', 'INVALID_JUMP',
'OUT_OF_GAS', 'OUT_OF_GAS',
]); ]);

View File

@@ -93,7 +93,7 @@ describe.only('EtherTokenWrapper', () => {
return expect( return expect(
zeroEx.etherToken.withdrawAsync(overWETHBalance, addressWithETH), zeroEx.etherToken.withdrawAsync(overWETHBalance, addressWithETH),
).to.be.rejectedWith(ZeroExError.INSUFFICIENT_WETH_BALANCE_FOR_WITHDRAWL); ).to.be.rejectedWith(ZeroExError.INSUFFICIENT_WETH_BALANCE_FOR_WITHDRAWAL);
}); });
}); });
}); });