Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is a logic missing in adapter cfbenchmarks's endpoint/crypto-lwba.ts. #2948

Open
blackbear10000 opened this issue Aug 28, 2023 · 0 comments

Comments

@blackbear10000
Copy link

Description

There is a logic missing in adapter cfbenchmarks's crypto-lwba.ts. When I set API_SECONDARY=false, the code here has no way to generate a proper index to req.requestContext.data.index.

I apologize if my issue may potentially cause inconvenience, as I am not entirely certain if it is the exact problem.
Thanks.

export const lwbaReqTransformer = (req: AdapterRequest<typeof inputParameters.validated>): void => {
  additionalInputValidation(req.requestContext.data)

  if (!req.requestContext.data.index) {
    req.requestContext.data.index = getSecondaryId(
      req.requestContext.data.base as string,
      req.requestContext.data.quote as string,
    )
  }

  // Clear base quote to ensure an exact match in the cache with index
  delete req.requestContext.data.base
  delete req.requestContext.data.quote
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant