fix quote consumer RFQ VIP code path not checking if transfromERC20 is required (#461)
Co-authored-by: Lawrence Forman <me@merklejerk.com>
This commit is contained in:
committed by
Noah Khamliche
parent
aca9338acb
commit
4929c60565
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"version": "16.55.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Fix fillRfqOrder VIP being used for swaps that need transformERC20",
|
||||
"pr": 461
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "16.54.0",
|
||||
"changes": [
|
||||
|
||||
@@ -70,6 +70,7 @@ import {
|
||||
isDirectSwapCompatible,
|
||||
isMultiplexBatchFillCompatible,
|
||||
isMultiplexMultiHopFillCompatible,
|
||||
requiresTransformERC20,
|
||||
} from './quote_consumer_utils';
|
||||
|
||||
// tslint:disable-next-line:custom-no-magic-numbers
|
||||
@@ -364,7 +365,8 @@ export class ExchangeProxySwapQuoteConsumer implements SwapQuoteConsumerBase {
|
||||
[ChainId.Mainnet, ChainId.Polygon].includes(this.chainId) &&
|
||||
!isToETH &&
|
||||
!isFromETH &&
|
||||
quote.orders.every(o => o.type === FillQuoteTransformerOrderType.Rfq)
|
||||
quote.orders.every(o => o.type === FillQuoteTransformerOrderType.Rfq) &&
|
||||
!requiresTransformERC20(optsWithDefaults)
|
||||
) {
|
||||
const rfqOrdersData = quote.orders.map(o => o.fillData as NativeRfqOrderFillData);
|
||||
const fillAmountPerOrder = (() => {
|
||||
|
||||
Reference in New Issue
Block a user