@0x/asset-swapper: Add rfqtTakerAddress to FillQuoteTransformerData

This commit is contained in:
Lawrence Forman
2020-09-02 12:43:29 -04:00
committed by Lawrence Forman
parent dba6972281
commit a6cf8ae0b6
2 changed files with 7 additions and 0 deletions

View File

@@ -93,6 +93,10 @@
{
"note": "Use `IZeroExContract` in EP swap quote consumer.",
"pr": 2657
},
{
"note": "Set `rfqtTakerAddress` to null in EP consumer",
"pr": 2692
}
]
},

View File

@@ -118,6 +118,7 @@ export class ExchangeProxySwapQuoteConsumer implements SwapQuoteConsumerBase {
refundReceiver: refundReceiver || NULL_ADDRESS,
fillAmount: firstHopOrder.takerAssetAmount,
maxOrderFillAmounts: [],
rfqtTakerAddress: NULL_ADDRESS,
orders: [firstHopOrder],
signatures: [firstHopOrder.signature],
}),
@@ -131,6 +132,7 @@ export class ExchangeProxySwapQuoteConsumer implements SwapQuoteConsumerBase {
side: FillQuoteTransformerSide.Sell,
fillAmount: MAX_UINT256,
maxOrderFillAmounts: [],
rfqtTakerAddress: NULL_ADDRESS,
orders: [secondHopOrder],
signatures: [secondHopOrder.signature],
}),
@@ -145,6 +147,7 @@ export class ExchangeProxySwapQuoteConsumer implements SwapQuoteConsumerBase {
side: isBuyQuote(quote) ? FillQuoteTransformerSide.Buy : FillQuoteTransformerSide.Sell,
fillAmount: isBuyQuote(quote) ? quote.makerAssetFillAmount : quote.takerAssetFillAmount,
maxOrderFillAmounts: [],
rfqtTakerAddress: NULL_ADDRESS,
orders: quote.orders,
signatures: quote.orders.map(o => o.signature),
}),