fix: [asset-swapper] Encoded Buy fillAmount (#106)

This commit is contained in:
Jacob Evans
2020-12-31 13:18:25 +10:00
committed by GitHub
parent 4bf6a23d23
commit c3c27eaedc
2 changed files with 9 additions and 1 deletions

View File

@@ -1,4 +1,12 @@
[
{
"version": "5.6.1",
"changes": [
{
"note": "Fix fillAmount `ExchangeProxySwapQuoteConsumer` encoding when quote is a BuyQuote"
}
]
},
{
"version": "5.6.0",
"changes": [

View File

@@ -205,7 +205,7 @@ export class ExchangeProxySwapQuoteConsumer implements SwapQuoteConsumerBase {
buyToken,
refundReceiver: refundReceiver || NULL_ADDRESS,
side: isBuyQuote(quote) ? FillQuoteTransformerSide.Buy : FillQuoteTransformerSide.Sell,
fillAmount: shouldSellEntireBalance ? MAX_UINT256 : fillAmount,
fillAmount: !isBuyQuote(quote) && shouldSellEntireBalance ? MAX_UINT256 : fillAmount,
maxOrderFillAmounts: [],
rfqtTakerAddress: NULL_ADDRESS,
orders: quote.orders,