aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts')
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts14
1 files changed, 4 insertions, 10 deletions
diff --git a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts
index e61f5bbdc..49193f816 100644
--- a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts
+++ b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts
@@ -744,19 +744,13 @@ export class ExchangeWrapper extends ContractWrapper {
) {
throw new Error(ExchangeWrapperError.AssetDataMismatch);
}
- // Smart contracts assigns the asset data from the left order to the right one so we can save gas on reducing the size of call data
- const optimizedRightSignedOrder = {
- ...rightSignedOrder,
- makerAssetData: '0x',
- takerAssetData: '0x',
- };
const exchangeInstance = await this._getExchangeContractAsync();
if (orderTransactionOpts.shouldValidate) {
await exchangeInstance.matchOrders.callAsync(
leftSignedOrder,
- optimizedRightSignedOrder,
+ rightSignedOrder,
leftSignedOrder.signature,
- optimizedRightSignedOrder.signature,
+ rightSignedOrder.signature,
{
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,
@@ -767,9 +761,9 @@ export class ExchangeWrapper extends ContractWrapper {
}
const txHash = await exchangeInstance.matchOrders.sendTransactionAsync(
leftSignedOrder,
- optimizedRightSignedOrder,
+ rightSignedOrder,
leftSignedOrder.signature,
- optimizedRightSignedOrder.signature,
+ rightSignedOrder.signature,
{
from: normalizedTakerAddress,
gas: orderTransactionOpts.gasLimit,