Skip to content

fix(docs): Correct deadline example in README #8

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

Merged
merged 1 commit into from
Jun 23, 2025

Conversation

TadejPolajnar
Copy link
Contributor

@TadejPolajnar TadejPolajnar commented Jun 23, 2025

The example the README was generating deadline as a floating-point number, which causes an Invalid input: query.deadline: Expected integer, received float error from the endpoint.

This PR corrects the example by using Math.floor() to ensure the deadline is always an integer.

Before:

const deadline = String(Date.now() / 1000 + 10 * 60) // 1750647648.403

Aftee:

const deadline = String(Math.floor(Date.now() / 1000) + 10 * 60) // 1750647648

@TadejPolajnar TadejPolajnar force-pushed the fix-readme-example-params branch 2 times, most recently from 3825aff to c9bd040 Compare June 23, 2025 06:26
@TadejPolajnar TadejPolajnar force-pushed the fix-readme-example-params branch from c9bd040 to 27bba4b Compare June 23, 2025 08:09
Copy link
Collaborator

@dglowinski dglowinski left a comment

Choose a reason for hiding this comment

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

Well spotted, thanks!

@hoytech hoytech merged commit 278bee4 into euler-xyz:master Jun 23, 2025
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.

3 participants