Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: add back debug logs for quote fetching
  • Loading branch information
priyajeet committed Sep 17, 2025
commit 58898ccd276599c2463fdf5ce120950c705b858e
10 changes: 10 additions & 0 deletions src/routes/operator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ class QuoteMetadataCache {
params: QuoteParams,
route: SDKv2Route,
): Promise<QuoteResult> {
console.debug('Fetching quote using', routeName, params);

const key = this.quoteParamsKey(routeName, params);
const pending = this.pending[key];

Expand All @@ -341,6 +343,12 @@ class QuoteMetadataCache {
params.recipient,
)
.then(({ routeInstance, quote, request }: QuoteMetadata) => {
console.debug(
`\x1b[32mSuccessfully fetched quote using`,
routeName,
quote,
);

const pending = this.pending[key];

for (const { resolve } of pending) {
Expand All @@ -356,6 +364,8 @@ class QuoteMetadataCache {
this.cache[key] = new QuoteMetadataEntry(quote, routeInstance, request);
})
.catch((err: any) => {
console.debug(`\x1b[31mFailed to fetch quote using`, routeName, err);

const pending = this.pending[key];

for (const { reject } of pending) {
Expand Down
Loading