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

fix: fixed the cosmwasm msg types #1281

Closed
wants to merge 4 commits into from
Closed

fix: fixed the cosmwasm msg types #1281

wants to merge 4 commits into from

Conversation

dadamu
Copy link
Contributor

@dadamu dadamu commented Oct 7, 2022

The typescript file of messages using new macro cw_serde then generated by codegen are no longer fix Record<string, unknown>. The msg types should be JsonObject, instead.

The reason is as follows:

  1. schema json changed to have value "additionalProperties": false by this change in cw_nfts
  2. codegen ts structure loses [k: string]: unknown, it can be found at cw721-base-instantiate-with-cw-serde and cw721-poap-instantiate-without-cw-serde
  3. without [k: string]: unknown field, message is no longer to match Record<string, unknown>

@webmaster128
Copy link
Member

webmaster128 commented Oct 10, 2022

Interesting. I came across a this issue recently as well when writing a interface MyManualMessageTypeDefinition { ... }. Wanted to change this to any. But maybe this fix is better.

Nevermind, type JsonObject = any

@webmaster128
Copy link
Member

webmaster128 commented Oct 10, 2022

I picked up this work and extended it a bit in #1284. Thanks a lot!

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.

None yet

2 participants