diff --git a/sdk/src/titan/titanClient.ts b/sdk/src/titan/titanClient.ts index c26ba0166..339a8e5d1 100644 --- a/sdk/src/titan/titanClient.ts +++ b/sdk/src/titan/titanClient.ts @@ -244,11 +244,8 @@ export class TitanClient { this.lastQuoteData = data; this.lastQuoteParams = params.toString(); - const route = - data.quotes[ - Object.keys(data.quotes).find((key) => key.toLowerCase() === 'titan') || - '' - ]; + // We are only querying for the best avaiable route so use that + const route = data.quotes[Object.keys(data.quotes)[0]]; if (!route) { throw new Error('No routes available'); @@ -341,11 +338,8 @@ export class TitanClient { // Reuse the cached quote data const data = this.lastQuoteData; - const route = - data.quotes[ - Object.keys(data.quotes).find((key) => key.toLowerCase() === 'titan') || - '' - ]; + // We are only querying for the best avaiable route so use that + const route = data.quotes[Object.keys(data.quotes)[0]]; if (!route) { throw new Error('No routes available');