diff --git a/contracts/asset-proxy/test/erc1155_proxy.ts b/contracts/asset-proxy/test/erc1155_proxy.ts index fef6e7074f..285c26b52c 100644 --- a/contracts/asset-proxy/test/erc1155_proxy.ts +++ b/contracts/asset-proxy/test/erc1155_proxy.ts @@ -17,7 +17,7 @@ import { import { BlockchainLifecycle } from '@0x/dev-utils'; import { assetDataUtils } from '@0x/order-utils'; import { AssetProxyId, RevertReason } from '@0x/types'; -import { BigNumber } from '@0x/utils'; +import { BigNumber, SafeMathRevertErrors } from '@0x/utils'; import * as chai from 'chai'; import { LogWithDecodedArgs } from 'ethereum-types'; import * as ethUtil from 'ethereumjs-util'; @@ -1831,20 +1831,22 @@ describe('ERC1155Proxy', () => { // check balances before transfer const expectedInitialBalances = [spenderInitialFungibleBalance, receiverInitialFungibleBalance]; await erc1155Wrapper.assertBalancesAsync(tokenHolders, tokensToTransfer, expectedInitialBalances); - // execute transfer - await expectTransactionFailedAsync( - erc1155ProxyWrapper.transferFromAsync( - spender, - receiver, - erc1155Contract.address, - tokensToTransfer, - valuesToTransfer, - valueMultiplier, - receiverCallbackData, - authorized, - ), - RevertReason.Uint256Underflow, + const expectedError = new SafeMathRevertErrors.Uint256UnderflowError( + spenderInitialFungibleBalance, + valuesToTransfer[0], ); + // execute transfer + const tx = erc1155ProxyWrapper.transferFromAsync( + spender, + receiver, + erc1155Contract.address, + tokensToTransfer, + valuesToTransfer, + valueMultiplier, + receiverCallbackData, + authorized, + ); + expect(tx).to.revertWith(expectedError); }); it('should revert if sender allowance is insufficient', async () => { // dremove allowance for ERC1155 proxy