Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
[asset-swapper] Forwarder throws on market sell if amount not sold (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dekz authored Mar 30, 2020
1 parent 98a5ab4 commit 77bdb90
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,13 @@ export class ForwarderSwapQuoteConsumer implements SwapQuoteConsumerBase {
.getABIEncodedTransactionData();
} else {
calldataHexString = this._forwarder
.marketSellOrdersWithEth(orders, signatures, [feeAmount], [normalizedFeeRecipientAddress])
.marketSellAmountWithEth(
orders,
quote.takerAssetFillAmount,
signatures,
[feeAmount],
[normalizedFeeRecipientAddress],
)
.getABIEncodedTransactionData();
}

Expand Down Expand Up @@ -139,7 +145,7 @@ export class ForwarderSwapQuoteConsumer implements SwapQuoteConsumerBase {
});
} else {
txHash = await this._forwarder
.marketSellOrdersWithEth(orders, signatures, [feeAmount], [feeRecipient])
.marketSellAmountWithEth(orders, quote.takerAssetFillAmount, signatures, [feeAmount], [feeRecipient])
.sendTransactionAsync({
from: finalTakerAddress,
gas: gasLimit,
Expand Down

0 comments on commit 77bdb90

Please sign in to comment.