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

Frontend: Compilation error in generated React Hooks code #3554

Closed
taryune opened this issue Jun 20, 2023 · 1 comment · Fixed by #3592
Closed

Frontend: Compilation error in generated React Hooks code #3554

taryune opened this issue Jun 20, 2023 · 1 comment · Fixed by #3592
Labels
type:error Something isn't working

Comments

@taryune
Copy link

taryune commented Jun 20, 2023

Describe the bug
I got following error when I compile react frontend.

src/hooks/useIbcApplicationsTransferV1/index.ts:8:32: ERROR: Unexpected "**"

At react/src/hooks/useIbcApplicationsTransferV1/index.ts, There are some unnecessary string =** before type definitions

To reproduce
Steps to reproduce the behavior:

  1. Scaffold new chain
  2. Scaffold React template with ignite s react
  3. Generate Typescript client and hooks with ignite g hooks
  4. Refer react/src/hooks/useIbcApplicationsTransferV1/index.ts
  5. There are some =** before type definitions
export default function useIbcApplicationsTransferV1() {
  const client = useClient();
  const QueryDenomTrace = (hash=**: string,  options: any) => {
    const key = { type: 'QueryDenomTrace',  hash=** };    
    return useQuery([key], () => {
      const { hash=** } = key
      return  client.IbcApplicationsTransferV1.query.queryDenomTrace(hash=**).then( res => res.data );
    }, options);
  }
 

What version are you using?
Ignite CLI version: v0.27.1
Ignite CLI build date: 2023-06-13T13:42:09Z
Ignite CLI source hash: 4acd1f1
Ignite CLI config version: v1
Cosmos SDK version: v0.47.3
Your OS: darwin
Your arch: arm64
Your Node.js version: v18.16.0
Your go version: go version go1.20.4 darwin/arm64

@taryune taryune added the type:error Something isn't working label Jun 20, 2023
@clockworkgr
Copy link
Collaborator

This is related to the following change in ibc-go:

cosmos/ibc-go@002b266

@ilgooz / @jeronimoalbi we need to modify the relevant analysis code...Should we do it as a hotfix (if possible) or as part of the analysis refactor ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:error Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants