Await Axios response so we don't circumvent catch
Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2541#discussion_r406604110
This commit is contained in:
parent
264407b707
commit
0cb5e4553b
@ -54,7 +54,7 @@ export class QuoteRequestor {
|
|||||||
const responsesIfDefined: Array<void | AxiosResponse<SignedOrder>> = await Promise.all(
|
const responsesIfDefined: Array<void | AxiosResponse<SignedOrder>> = await Promise.all(
|
||||||
this._rfqtMakerEndpoints.map(async rfqtMakerEndpoint => {
|
this._rfqtMakerEndpoints.map(async rfqtMakerEndpoint => {
|
||||||
try {
|
try {
|
||||||
return Axios.get<SignedOrder>(`${rfqtMakerEndpoint}/quote`, {
|
return await Axios.get<SignedOrder>(`${rfqtMakerEndpoint}/quote`, {
|
||||||
headers: { '0x-api-key': takerApiKey },
|
headers: { '0x-api-key': takerApiKey },
|
||||||
params: {
|
params: {
|
||||||
sellToken,
|
sellToken,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user