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

asset-swapper: RFQ-T indicative quotes #2555

Merged
merged 19 commits into from
Apr 22, 2020
Merged

asset-swapper: RFQ-T indicative quotes #2555

merged 19 commits into from
Apr 22, 2020

Conversation

feuGeneA
Copy link
Contributor

@feuGeneA feuGeneA commented Apr 16, 2020

When a request specifies a whitelisted API key, and a taker address, and does not specify intentToFill=true, the SwapQuoter passes its QuoteRequestor into MarketOperationUtils, so that it can call QuoteRequestor.getRfqtIndicativeQuotesAsync(), which it transforms into weird pseudo-native-orders, which in turn get fed into order routing along with all of the other native orders.

This code is not yet covered with tests here, but is being exercised in the end-to-end test in 0xProject/0x-api#172, which is integrated with CI there, and which is living at 0xProject/0x-api@66c9d9d#diff-491d90fb8eb25e485b3d8c9429e6754cR326.

  • Add tests
  • Updated CHANGELOGs

@feuGeneA feuGeneA self-assigned this Apr 16, 2020
@coveralls
Copy link

coveralls commented Apr 16, 2020

Coverage Status

Coverage increased (+0.1%) to 79.688% when pulling 153533f on rfq-t-indicative into 7396bb5 on development.

@@ -92,10 +88,25 @@ export class MarketOperationUtils {
this._liquidityProviderRegistry,
),
);
const rfqtPromise =
opts !== undefined && _opts.rfqt !== undefined && _opts.rfqt.quoteRequestor !== undefined
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we merge defaults into _opts, and never access it further down, do we need the opts !== undefined check?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a bug, that I noticed too, and fixed here: d6d4d29#diff-bdb1465a97651026c09ef607e5de9e6fR97

@@ -16,7 +16,9 @@ export const samplerOperations = {
.getABIEncodedTransactionData();
},
handleCallResultsAsync: async (contract, callResults) => {
return contract.getABIDecodedReturnData<BigNumber[]>('getOrderFillableTakerAssetAmounts', callResults);
return contract
.getABIDecodedReturnData<BigNumber[]>('getOrderFillableTakerAssetAmounts', callResults)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming they're not signing the orders where the intent to fill is false? Rather than use takerAddress as a conditional can we determine this off the signature, or lack there of?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry, I wrote this commit while blindly following the spec I wrote. In retrospect, this idea, of making the sampler bypass fillability checks because these orders are unsigned, is moot now.

This is because we're getting indicative quotes in parallel with the on-chain call, not prior to it (like we do for firm quotes), and we're piping the quotes directly into the order router, and there's no further fillability check after routing*, so there's no need for such a hack.

It was only ever consideration when we were trying to decide whether to request quotes from SwapQuoter or from MarketOperationUtils, but ultimately we decided to do both (for latency reasons), alleviating the need for this.

*: Of course there's the gas estimation / transaction validation stage that happens in the 0x-api side, but you'll see there that I'm forcing skipValidation to true when handling /swap/price requests and delegating them to the handler for /swap/quote.

Copy link
Contributor

@steveklebanoff steveklebanoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Added a few comments. I can't speak to the "paths" much though, will defer to Jacob & Lawrence on the feedback there.

@@ -165,11 +171,26 @@ export class MarketOperationUtils {
this._liquidityProviderRegistry,
),
);
const rfqtPromise =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At what point do we want to short-circuit considering RFQT MMers will not suppot buys to begin with?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems ok to leave in, depends on the ETA for buyAmount support in RFQT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be down to leave it in if we can get it looking nicer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is my attempt at making it look nicer: 5effc6e

return responses;
}

private _isValidRfqtIndicativeQuoteResponse(response: RfqtIndicativeQuoteResponse): boolean {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is OK for now, but it may be nice in the future to introduce a proper JSON schema file for this.

@steveklebanoff steveklebanoff marked this pull request as ready for review April 16, 2020 22:58
@steveklebanoff steveklebanoff marked this pull request as draft April 16, 2020 22:58
There's one subtlety here: apiKey has been moved to be within the rfqt
namespace, after talking to Fabio and discovering that he only needs to
re-use the API key in 0x API, not in asset-swapper.
For use in upcoming implementation of indicative quotes.
These changes have been exercised via mocha tests in the 0x-api repo.

Not sure why I had to add GetMarketOrdersRfqtOpts to the package
exports.  `yarn test:generate_docs:circleci` said:

$ node ./packages/monorepo-scripts/lib/doc_generate.js --package @0x/asset-swapper
GENERATE_DOCS: Generating Typedoc JSON for @0x/asset-swapper...
GENERATE_DOCS: Generating Typedoc Markdown for @0x/asset-swapper...
GENERATE_DOCS: Modifying Markdown To Exclude Unexported Items...
Error: @0x/asset-swapper package needs to export:
GetMarketOrdersRfqtOpts
From it's index.ts. If any are from external dependencies, then add them to the EXTERNAL_TYPE_MAP.
    at DocGenerateUtils._lookForMissingReferenceExportsThrowIfExists (/root/repo/packages/monorepo-scripts/lib/utils/doc_generate_utils.js:288:19)
    at DocGenerateUtils.<anonymous> (/root/repo/packages/monorepo-scripts/lib/utils/doc_generate_utils.js:255:34)
    at step (/root/repo/packages/monorepo-scripts/lib/utils/doc_generate_utils.js:32:23)
    at Object.next (/root/repo/packages/monorepo-scripts/lib/utils/doc_generate_utils.js:13:53)
    at fulfilled (/root/repo/packages/monorepo-scripts/lib/utils/doc_generate_utils.js:4:58)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
@feuGeneA feuGeneA marked this pull request as ready for review April 17, 2020 07:45
@@ -34,6 +35,7 @@ export enum ERC20BridgeSource {
CurveUsdcDaiUsdtTusd = 'Curve_USDC_DAI_USDT_TUSD',
LiquidityProvider = 'LiquidityProvider',
CurveUsdcDaiUsdtBusd = 'Curve_USDC_DAI_USDT_BUSD',
Rfqt = 'Rfqt',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this used anywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's not. It's a remnant from the first draft. I've removed it here: 4cc9cea

Copy link
Contributor

@steveklebanoff steveklebanoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few comments. Overall looking quite good tho! Definitely would love a blessing from @dekz or @dorothy-zbornak so we can have a vote of confidence on all the sampling / path stuff though.

makerAddress: NULL_ADDRESS,
senderAddress: NULL_ADDRESS,
feeRecipientAddress: NULL_ADDRESS,
salt: ZERO_AMOUNT, // generatePseudoRandomSalt(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's up with this comment? Can we leave as zero?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh good eye. This method was basically copied from

function createCommonBridgeOrderFields(opts: CreateOrderFromPathOpts): CommonBridgeOrderFields {
, and I changed it to zero here, but preserved that call in the comments just in case it ended up not working for some reason. At this point I can say it's working, but I'd love some feedback from @dorothy-zbornak on whether we should be concerned about this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it matters since it's not signed and not intended to be used in anyway, just a vessel for the amounts.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it shouldn't matter. Might even be better to make these orders as unfillable as possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've cleaned up this function here: ad7868e

@@ -92,10 +93,25 @@ export class MarketOperationUtils {
this._liquidityProviderRegistry,
),
);
const rfqtPromise =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When would _opts ever be undefined?

Can make either make this ternary shorter, or break it out into something else? This feels a bit jarring to read

One option (still a pretty long statement for ternary tho)

const rfqtIndicativeQuotes = _opts.rfqt && _opts.rfqt.quoteRequestor ? _opts.rfqt.quoteRequestor.requestRfqtIndicativeQuotesAsync(...) : Promise.resolve<RfqtIndicativeQuoteResponse[]>([]);

Another option

let rfqtIndicativeQuotesPromise = Promise.resolve<RfqtIndicativeQuoteResponse[]>([]);
if (_opts.rfqt && _opts.rfqt.quoteRequestor) {
   rfqtIndicativeQuotesPromise = _opts.rfqt.quoteRequestor.requestRfqtIndicativeQuotesAsync(...)
}

Third option (I like this best)

const rfqtIndicativeQuotes = async (): Promise<RfqtIndicativeQuoteResponse[]> => {
   if (_opts.rfqt && _opts.rfqt.quoteRequestor) {
       return _opts.rfqt.quoteRequestor.requestRfqtIndicativeQuotesAsync(...);
   }
  return [];
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cleaned this up here: 5effc6e

Please let me know what you think.

senderAddress: NULL_ADDRESS,
feeRecipientAddress: NULL_ADDRESS,
salt: ZERO_AMOUNT, // generatePseudoRandomSalt(),
expirationTimeSeconds: new BigNumber(Math.floor(Date.now() / ONE_SECOND_MS) + ONE_HOUR_IN_SECONDS),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a future revision I def think we should expect an expirationTimeSeconds from the MMer and use that here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can probably just set this to zero as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put it at zero for now: ad7868e

takerFee: ZERO_AMOUNT,
fillableTakerFeeAmount: ZERO_AMOUNT,
signature: WALLET_SIGNATURE,
chainId: 0, // HACK !!!!!!!!! how can we get at this from this context?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can pass it in from MarketOperationUtils's this._orderDomain but will let @dekz or @dorothy-zbornak chime in here if there's a better way

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

both chainId and exchangeAddress are in the order domain.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just set them both to zero for now, per #2555 (comment)

takerFee: ZERO_AMOUNT,
fillableTakerFeeAmount: ZERO_AMOUNT,
signature: WALLET_SIGNATURE,
chainId: 0, // HACK !!!!!!!!! how can we get at this from this context?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

both chainId and exchangeAddress are in the order domain.

makerAssetData: string,
takerAssetData: string,
assetFillAmount: BigNumber,
): { buyToken: string; sellToken: string; buyAmount: string | undefined; sellAmount: string | undefined } {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
): { buyToken: string; sellToken: string; buyAmount: string | undefined; sellAmount: string | undefined } {
): { buyToken: string; sellToken: string; buyAmount?: string; sellAmount?: string } {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made this change here: 2c97208

makerAddress: NULL_ADDRESS,
senderAddress: NULL_ADDRESS,
feeRecipientAddress: NULL_ADDRESS,
salt: ZERO_AMOUNT, // generatePseudoRandomSalt(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it matters since it's not signed and not intended to be used in anyway, just a vessel for the amounts.

@@ -165,11 +171,26 @@ export class MarketOperationUtils {
this._liquidityProviderRegistry,
),
);
const rfqtPromise =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems ok to leave in, depends on the ETA for buyAmount support in RFQT?

export interface RfqtRequestOpts {
takerAddress: string;
apiKey: string;
intentOnFilling?: boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we force the default on this early on if it's not set to false?

Suggested change
intentOnFilling?: boolean;
intentOnFilling: boolean;

Copy link
Contributor Author

@feuGeneA feuGeneA Apr 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made this change here: 245b6da

@@ -165,11 +176,26 @@ export class MarketOperationUtils {
this._liquidityProviderRegistry,
),
);
const rfqtPromise =
opts !== undefined && _opts.rfqt !== undefined && _opts.rfqt.quoteRequestor !== undefined
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
opts !== undefined && _opts.rfqt !== undefined && _opts.rfqt.quoteRequestor !== undefined
_opts !== undefined && _opts.rfqt !== undefined && _opts.rfqt.quoteRequestor !== undefined

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed by consolidating this crazy conditional with the other instance of it here: 5effc6e

Copy link
Contributor

@dorothy-zbornak dorothy-zbornak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor suggestions, but looks pretty good!

Comment on lines 571 to 574
calcOpts.rfqt &&
!calcOpts.rfqt.intentOnFilling &&
calcOpts.rfqt.apiKey &&
this._rfqtTakerApiKeyWhitelist.includes(calcOpts.rfqt.apiKey)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe these conditions (minus the intentOnFilling check) could be put into a function like isRfqtEnabled(opts.rfqt) since there are two places where this happens.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I simplified this here: ba2ac6a

@@ -165,11 +171,26 @@ export class MarketOperationUtils {
this._liquidityProviderRegistry,
),
);
const rfqtPromise =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be down to leave it in if we can get it looking nicer.

Comment on lines 97 to 105
_opts !== undefined && _opts.rfqt !== undefined && _opts.rfqt.quoteRequestor !== undefined
? _opts.rfqt.quoteRequestor.requestRfqtIndicativeQuotesAsync(
nativeOrders[0].makerAssetData,
nativeOrders[0].takerAssetData,
takerAmount,
MarketOperation.Sell,
_opts.rfqt,
)
: Promise.resolve<RfqtIndicativeQuoteResponse[]>([]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we just put this all into a function like getRfqtIndicativeQuotesAsync(nativeOrders, takerAmount, MarketOpreration.Sell, _opts.rfqt)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea, thank you, did it here: 5effc6e

Comment on lines 97 to 105
_opts !== undefined && _opts.rfqt !== undefined && _opts.rfqt.quoteRequestor !== undefined
? _opts.rfqt.quoteRequestor.requestRfqtIndicativeQuotesAsync(
nativeOrders[0].makerAssetData,
nativeOrders[0].takerAssetData,
takerAmount,
MarketOperation.Sell,
_opts.rfqt,
)
: Promise.resolve<RfqtIndicativeQuoteResponse[]>([]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Promise.resolve() is probably unnecessary here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to remove it and got errors.

makerAddress: NULL_ADDRESS,
senderAddress: NULL_ADDRESS,
feeRecipientAddress: NULL_ADDRESS,
salt: ZERO_AMOUNT, // generatePseudoRandomSalt(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it shouldn't matter. Might even be better to make these orders as unfillable as possible.

senderAddress: NULL_ADDRESS,
feeRecipientAddress: NULL_ADDRESS,
salt: ZERO_AMOUNT, // generatePseudoRandomSalt(),
expirationTimeSeconds: new BigNumber(Math.floor(Date.now() / ONE_SECOND_MS) + ONE_HOUR_IN_SECONDS),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can probably just set this to zero as well.

Comment on lines +39 to +40
takerAddress === undefined ||
takerAddress === '' ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
takerAddress === undefined ||
takerAddress === '' ||
!takerAddress ||

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made this change here: 83289bc

Comment on lines 386 to 387
chainId: 0, // HACK !!!!!!!!! how can we get at this from this context?
exchangeAddress: NULL_ADDRESS, // HACK !!!!!!!!! how can we get at this from this context?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neither of these really matter since these orders aren't valid anyway, so I'm fine with leaving it as-is and making the comments less frightening lol

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did just that: ad7868e

Thank you

Validate that the responses returned from maker endpoints both conform
to expected JSON schema data types and also have the expected asset
data, per the taker's request.
feuGeneA added a commit that referenced this pull request Apr 21, 2020
@feuGeneA feuGeneA requested a review from dekz April 21, 2020 05:49
Copy link
Member

@dekz dekz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM let's try this puppy out.

feuGeneA added a commit to 0xProject/0x-api that referenced this pull request Apr 21, 2020
feuGeneA added a commit to 0xProject/0x-api that referenced this pull request Apr 21, 2020
@steveklebanoff
Copy link
Contributor

I feel good about all the outstanding changes I requested -- nice work!

opts.rfqt,
);
} else {
return Promise.resolve<RfqtIndicativeQuoteResponse[]>([]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we just return []; here?

Note: this is a nit, don't need to change

assetFillAmount: BigNumber,
opts: Partial<GetMarketOrdersOpts>,
): Promise<RfqtIndicativeQuoteResponse[]> {
if (opts.rfqt && opts.rfqt.quoteRequestor) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE: This is where we need to ensure intentOnFilling is to true

I tried to get fancy back in 5effc6e.
I changed something more than the single refactor targetted by the
commit, and it broke things!  This reverts part of that commit,
restoring clean runs of 0x API tests.
return opts !== undefined && !opts.intentOnFilling && this._rfqtTakerApiKeyWhitelist.includes(opts.apiKey);
return (
opts !== undefined &&
opts.isIndicative !== undefined &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dont need this undefined check

takerAddress: string;
apiKey: string;
intentOnFilling: boolean;
isIndicative?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit but would prefer for this to be required

Copy link
Contributor

@steveklebanoff steveklebanoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@feuGeneA feuGeneA merged commit 07acc95 into development Apr 22, 2020
@feuGeneA feuGeneA deleted the rfq-t-indicative branch April 22, 2020 20:34
feuGeneA added a commit to 0xProject/0x-api that referenced this pull request Apr 23, 2020
* Adapt to asset-swapper RFQ-T option restructuring

A handful of RFQ-T options were restructured in 0xProject/0x-monorepo@957e3eb

This adapts to those changes.

* Support for RFQ-T indicative quotes

Renamed method getSwapQuoteAsync() to _getSwapQuoteAsync(), and created
a new getSwapQuoteAsync() to delegeate to it, all for the purposes of
also calling into _getSwapQuoteAsync() of the newly introduced method
getSwapPriceAsync().

Unfortunately, the diff looks noisy because the old public method was
changed to be private, forcing it to move down below publics in the
method order.  This resulted resulting in my diff viewer showing that
two previously existing methods (getSwapPricesAsync() [notice that one's
plural, not to be confused with the aforementioned singular version] and
getTokenPricesAsync()) moved UP in the diff.

Those two existing methods have not changed, and it's easier to review
this commit if you understand the pattern they contribute to the overall
diff.

* Remove Rfqt from gasSchedule

* Relay source breakdown to price endpoint consumer

* Log orders underlying indicative quotes

Log the orders that are used to construct indicative quotes.  These are
"dummy" orders, but for now we need to see them in the logs in order to
verify that indicative quotes are being served, since there is no
separate source for RFQ-T (they are lumped in with the '0x' source.)

Long term, this log entry may prove useful if it isn't too noisy.  If it
is, we can remove it after manual testing.

* Incorporate API key into GetSwapQuoteRequestParams

Addresses review comment #172 (comment)

* Get Forwarder address once, not every req

Addresses (at least part of) review comment #172 (comment)

* Accommodate asset-swpr's now-req'd intentOnFilling

See 0xProject/0x-monorepo#2555 (comment)

* pin asset-swapper to monorepo commit

* Add the correct CORS headers

* Ran prettier

* Revert "Ran prettier"

This reverts commit b8641c0.

* Revert "Add the correct CORS headers"

This reverts commit 03b3ac1.

* Test case for weird zero order from indicative

When the client gives an API key and a taker address, but not saying
intentOnFilling=true, the process is falling into an indicative quote
mode, and a weird "all zeroes" order (zero salt, NULL_ADDRESS exchange
address, etc) was being included in the order salad.

* Fix for weird zero orders. depends on new AS

Utilize the new `isIndicative` flag provided by asset-swapper in order
to indicate when indicative quotes should NOT be solicited.

* Remove diagnostic logging of indicative quotes

Addresses review comment #172 (comment)

* update monorepo pin

* Add test of indicative w/ intentOnFilling omitted

* Clarify RFQ-T enablement logic

* Make axios retryable only when desired (#185)

* update monorepo pin to development branch commit

Co-authored-by: Daniel Pyrathon <[email protected]>
Co-authored-by: Steve Klebanoff <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants