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

cli: fix generated read hooks select type #1892

Merged
merged 5 commits into from
Feb 21, 2023

Conversation

greg-schrammel
Copy link
Contributor

@greg-schrammel greg-schrammel commented Feb 20, 2023

Description

fix generated read hooks select type

// before
const { data } = useMyGeneratedHook({
  select: data => data[0].toBigInt()
 }) 

data
// ^? type data = [BigNumber] | undefined

// after fix
const { data } = useMyGeneratedHook({
  select: data => data[0].toBigInt()
 }) 

data
// ^? type data = bigint | undefined

@changeset-bot
Copy link

changeset-bot bot commented Feb 20, 2023

🦋 Changeset detected

Latest commit: 973fa10

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@wagmi/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Feb 20, 2023

@greg-schrammel is attempting to deploy a commit to the wagmi Team on Vercel.

A member of the Team first needs to authorize it.

@greg-schrammel greg-schrammel changed the title fix generated useContractRead select type cli: fix generated read hooks select type Feb 20, 2023
.changeset/tasty-dolphins-flash.md Outdated Show resolved Hide resolved
packages/cli/src/plugins/react.ts Outdated Show resolved Hide resolved
packages/cli/src/plugins/react.ts Outdated Show resolved Hide resolved
@tmm
Copy link
Member

tmm commented Feb 21, 2023

Good spot! Made a couple changes and looks ready to go.

@vercel
Copy link

vercel bot commented Feb 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
wagmi ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 21, 2023 at 10:13PM (UTC)

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