Skip to content

Update hypersync client field selection and bindings - #117

Merged
JonoPrest merged 4 commits into
mainfrom
jp/update-field-selection
Aug 13, 2024
Merged

JonoPrest merged 4 commits into
mainfrom
jp/update-field-selection

Conversation

@JonoPrest

Copy link
Copy Markdown
Collaborator
  • Makes all config field selection camelCase instead of snake_case to match the fields that get returned from request
  • Update hs client bindings to use PascalCase for field selection for new enum type
  • Updates the used hs client types to match the ts types exactly (including type names to avoid confusion)
  • Updates all tests/config examples that use field selection

@JonoPrest
JonoPrest requested a review from DZakh August 13, 2024 11:38

@DZakh DZakh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👌

transaction_fields:
- hash
- transaction_index
- transactionIndex

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Didn't we decide to change it to index? Or is it a part of another PR?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Have a look at the thread on this closed PR enviodev/hypersync-client-node#24

It was decided that it's best to keep it transactionIndex

Comment on lines 3 to 4
field_selection:
transaction_fields:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should they be camel case as well?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes will update thanks 👍🏼

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Oh actually sorry I misread this comment. I think the answer is no since the rest of human config uses snake case for parameters.

Comment on lines -118 to +264
nonce?: int, //nullable
nonce?: bigint,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe keep the nullable comment? And if it's returned as null won't it break things?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

With the updated client it's no longer nullable. I'm copying directly the types generated from the Napi framework.

@JonoPrest
JonoPrest merged commit 25e4e84 into main Aug 13, 2024
@JonoPrest
JonoPrest deleted the jp/update-field-selection branch August 13, 2024 13:03
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