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

refactor: get tokens request #201

Merged
merged 2 commits into from
Oct 23, 2023
Merged

refactor: get tokens request #201

merged 2 commits into from
Oct 23, 2023

Conversation

rialco
Copy link
Contributor

@rialco rialco commented Oct 20, 2023

The get tokens endpoint accepts an array of strings as the parameter for chains. It is documented here.

The issue with the current type is that Ajv JsonSchemaType will only accept numbers in the schema, stating this error:

Property 'type' is missing in type '{ oneOf: { type: string; $ref: string; }[]; }' but required in type 
'{ type: "number" | "integer"; }'.

Even with our current schema that contains chain keys and chain ids it will fail showing this error when passing a chain key:

{
    "message": "querystring/chains/0 must be integer: /chains/0: must be integer"
}

@rialco rialco requested a review from mathiasmoeller October 20, 2023 23:15
src/api.ts Outdated Show resolved Hide resolved
@rialco rialco requested a review from mathiasmoeller October 23, 2023 13:59
Copy link
Member

@mathiasmoeller mathiasmoeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@rialco rialco merged commit 77a87d5 into main Oct 23, 2023
4 checks passed
@rialco rialco deleted the refactor/tokens-request branch October 23, 2023 15:23
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

Successfully merging this pull request may close these issues.

2 participants