Skip to content

Commit

Permalink
chores: returning an array with bridgeRouteErrors instead of an obj
Browse files Browse the repository at this point in the history
  • Loading branch information
salil-naik committed Jun 28, 2023
1 parent ea3f414 commit 2b818ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/baseSocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export abstract class BaseSocket {
async getAllQuotes(
{ path, address, amount }: QuoteParams,
preferences?: QuotePreferences
): Promise<SocketQuote[] | { bridgeRouteErrors: BridgeRouteErrors }> {
): Promise<SocketQuote[] | [{ bridgeRouteErrors: BridgeRouteErrors }]> {
const finalPreferences = {
...(this._options.defaultQuotePreferences || {}),
...(preferences || {}),
Expand Down Expand Up @@ -196,7 +196,7 @@ export abstract class BaseSocket {
amount,
refuel: quote.refuel,
errors: quote.bridgeRouteErrors,
})) || { bridgeRouteErrors: quote.bridgeRouteErrors }
})) || [{ bridgeRouteErrors: quote.bridgeRouteErrors }]
);
}

Expand Down

0 comments on commit 2b818ef

Please sign in to comment.