diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/contracts/src/contracts/current/protocol/Exchange/MixinAssetProxyDispatcher.sol | 9 | ||||
-rw-r--r-- | packages/contracts/test/exchange/core.ts | 4 |
2 files changed, 6 insertions, 7 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/MixinAssetProxyDispatcher.sol b/packages/contracts/src/contracts/current/protocol/Exchange/MixinAssetProxyDispatcher.sol index 93e752af3..f7086f543 100644 --- a/packages/contracts/src/contracts/current/protocol/Exchange/MixinAssetProxyDispatcher.sol +++ b/packages/contracts/src/contracts/current/protocol/Exchange/MixinAssetProxyDispatcher.sol @@ -180,13 +180,12 @@ contract MixinAssetProxyDispatcher is cdStart, // pointer to start of input sub(cdEnd, cdStart), // length of input cdStart, // write output over input - 0 // output size is 0 bytes + 512 // reserve 512 bytes for output ) + if eq(success, 0) { + revert(cdStart, returndatasize()) + } } - require( - success, - "TRANSFER_FAILED" - ); } } } diff --git a/packages/contracts/test/exchange/core.ts b/packages/contracts/test/exchange/core.ts index 99d2bc157..59756fe9a 100644 --- a/packages/contracts/test/exchange/core.ts +++ b/packages/contracts/test/exchange/core.ts @@ -817,7 +817,7 @@ describe('Exchange core', () => { const takerAssetFillAmount = signedOrder.takerAssetAmount; return expectRevertReasonOrAlwaysFailingTransactionAsync( exchangeWrapper.fillOrderAsync(signedOrder, takerAddress, { takerAssetFillAmount }), - RevertReason.TransferFailed, + RevertReason.InvalidAmount, ); }); @@ -840,7 +840,7 @@ describe('Exchange core', () => { const takerAssetFillAmount = signedOrder.takerAssetAmount; return expectRevertReasonOrAlwaysFailingTransactionAsync( exchangeWrapper.fillOrderAsync(signedOrder, takerAddress, { takerAssetFillAmount }), - RevertReason.TransferFailed, + RevertReason.InvalidAmount, ); }); |