Skip to content

Conversation

@usame-algan
Copy link
Contributor

@usame-algan usame-algan commented Apr 20, 2023

@usame-algan usame-algan requested a review from iamacook April 20, 2023 12:49
@github-actions
Copy link

github-actions bot commented Apr 20, 2023

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@katspaugh
Copy link
Member

Wait, so does it come as an actual null or undefined, or no field at all?

to: string
value: string
data: string
data?: string
Copy link
Member

Choose a reason for hiding this comment

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

It should be explicitly string | null.
The types that are marked as optional, if they are not defined, they don't appear in the JSON at all, so it's different in those cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

dataDecoded is also marked as optional but is actually returned as null in the CGW and TxService response. Is it possible to see which fields will appear in the JSON and which won't?

Copy link
Member

Choose a reason for hiding this comment

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

There are mistakes in the types apparently. I hope the new Nest.js CGW will have exportable types.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed it to be null instead.

Copy link
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

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

👍

@usame-algan usame-algan merged commit b4224e8 into main Apr 24, 2023
@usame-algan usame-algan deleted the nullable-data branch April 24, 2023 08:59
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