29 Commits

Author SHA1 Message Date
F. Eugene Aumson
05b25c6229
Ran prettier 2020-10-14 13:02:17 -04:00
Daniel Pyrathon
221de054f4 fixes a few issues with the typing 2020-10-07 19:34:12 -07:00
Daniel Pyrathon
efef5f122f added fix 2020-10-05 17:24:23 -07:00
Daniel Pyrathon
9e42dce5c4 added initial implementation 2020-10-01 14:28:36 -07:00
Daniel Pyrathon
25a3c18bfe fixed small test bug 2020-08-10 17:59:37 -07:00
Daniel Pyrathon
7cd30610f9 fixed tests 2020-08-10 16:33:42 -07:00
Daniel Pyrathon
4e030ce1e8 remove legacy taker request 2020-06-19 15:07:39 -07:00
Steve Klebanoff
2507ad274b
remove BigNumbers from expectedParams 2020-06-19 14:42:45 -07:00
F. Eugene Aumson
b8cc164af1
asset-s: rm refs to quoteExpiry for RFQT tests
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2582#discussion_r441836846
2020-06-17 17:29:35 -04:00
F. Eugene Aumson
ad868af96e
asset-swapper: use RFQT-specific response types
@0x/quote-server was recently updated to offer RFQT- and RFQM-specific
types, in addition to abstracted types.  Since everything here is RFQT
specific, usage has been changed to use those specific types.

Addresses review comments
https://github.com/0xProject/0x-monorepo/pull/2582#discussion_r437623138
and
https://github.com/0xProject/0x-monorepo/pull/2582#discussion_r437625305
2020-06-11 15:57:49 -04:00
F. Eugene Aumson
f7cd7110ea
asset-s: Remove erroneous addition of API key
It was added due to the introduction of the use of the TakerRequest type
from @0x/quote-server, as it's included in that structure.  However,
that structure is primarily used within the quote server as the output
of parameter parsing, and that parsing routine transforms the API key
HEADER from the request into the TakerRequest type.  In short, the API
key is input as a header, not a parameter.

Addresses review comment
https://github.com/0xProject/0x-monorepo/pull/2582#discussion_r437624647
2020-06-11 14:17:45 -04:00
F. Eugene Aumson
f7a414bc29
asset-s/RFQ: adapt to renamed TakerRequest fields 2020-05-26 15:24:42 -04:00
F. Eugene Aumson
e05cd1d66b
asset-s/QuoteRequestor: use TakerRequest type 2020-05-26 15:24:38 -04:00
F. Eugene Aumson
b9984b6df4
asset-swapper: fix bug: bad maker response throws
Formerly, a maker sending back a non-JSON was causing an exception to be
thrown.
2020-05-15 01:20:30 -04:00
F. Eugene Aumson
9c11835fee
asset-s: use @0x/quote-server, not local typedefs 2020-05-15 01:20:29 -04:00
F. Eugene Aumson
8a14b4afff
asset-swapper: clarify comment
This comment recently got moved from one context to another.  In the old
context, the whole comment made sense, but in the new context it needed
paring down.
2020-05-06 13:24:20 -04:00
F. Eugene Aumson
2922ebd095
asset-s/test: stop unnecessarily priming mock
Addresses review comment 93bdaba8ee (r419774170)
2020-05-05 17:17:47 -04:00
F. Eugene Aumson
38781807cd
asset-s: simplify test util usage 2020-05-05 12:53:31 -04:00
F. Eugene Aumson
c046943269
asset-s: fix bug: expiry is BigNumber, not string 2020-05-05 12:43:41 -04:00
F. Eugene Aumson
ae5421f76e
asset-s: Use expiryBufferMs to filter RFQ-T quotes 2020-04-29 17:24:51 -04:00
F. Eugene Aumson
a2e2b429d5
asset-s: exclude RFQ-T orders w/ bad takerAddress 2020-04-29 17:24:42 -04:00
F. Eugene Aumson
93bdaba8ee
asset-s: skip RFQT makers not supporting reqd pair
Skip querying an RFQ-T maker for a quote when the requested asset pair
isn't supported by that maker.
2020-04-29 17:23:10 -04:00
F. Eugene Aumson
4bcc4b3cf8
asset-s: relay expiration time in indicative quote 2020-04-29 15:45:35 -04:00
F. Eugene Aumson
8875f924b0
asset-s: test requestRfqtIndicativeQuotesAsync 2020-04-20 22:56:44 -04:00
F. Eugene Aumson
464c918134
asset-swapper: test RFQT indicative quote handling 2020-04-20 22:56:43 -04:00
F. Eugene Aumson
d6d4d29257
asset-swapper: RFQ-T 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)
2020-04-17 02:34:36 -04:00
F. Eugene Aumson
957e3eb93c
asset-swapper: Restructure RFQ-T request options
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.
2020-04-17 01:18:07 -04:00
Steve Klebanoff
47ef7fffce
RFQ-T: validate assetData & add more tests (#2552)
* test for returning a 200 with invalid data, and additonal logging for that case

* Ensure RFQ-T response has asset data we expect

* validate signed order schema

* give more descriptive variable names and test an unsigned order

* takeout unused var
2020-04-15 00:11:37 -04:00
Steve Klebanoff
84adbcb683
asset-swapper: Mockable axios for QuoteRequestor (#2549)
* Mockable axios for QuoteRequestor

* Move RFQT Mocker to src

* move MockedRfqtFirmQuoteResponse into types file

* fix import
2020-04-10 23:09:56 -04:00