Skip to content

Query enum tuple format missing argument #67

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

Closed
grod220 opened this issue Sep 14, 2022 · 1 comment
Closed

Query enum tuple format missing argument #67

grod220 opened this issue Sep 14, 2022 · 1 comment

Comments

@grod220
Copy link

grod220 commented Sep 14, 2022

When you have a query type such as:

#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
    #[returns(String)]
    AllPreviousOwners(String),

The generated typescript will be missing the String argument required for this query:

  allPreviousOwners = async (): Promise<String> => {
    return this.client.queryContractSmart(this.contractAddress, {
      all_previous_owners: {}
    });
  };

Reproducible example here: https://github.com/grod220/ts-codegen-example/blob/master/contracts/account-nft/src/msg/query.rs#L32-L33

@pyramation
Copy link
Collaborator

related (if not the same): #21

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

No branches or pull requests

2 participants