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

chore: Fix readContract docs #4920

Merged
merged 1 commit into from
Oct 5, 2024
Merged

chore: Fix readContract docs #4920

merged 1 commit into from
Oct 5, 2024

Conversation

kien-ngo
Copy link
Contributor

@kien-ngo kien-ngo commented Oct 4, 2024

Problem solved

Short description of the bug fixed or feature added


PR-Codex overview

This PR updates the useReadContract function calls in two files to properly format the method string by adding a trailing comma. This change ensures consistency and correctness in the function's parameters.

Detailed summary

  • In packages/thirdweb/src/transaction/read-contract.ts:

    • Added a trailing comma to the method string in useReadContract.
  • In packages/thirdweb/src/react/core/hooks/contract/useReadContract.ts:

    • Added a trailing comma to the method string in useReadContract.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Oct 4, 2024

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

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 5, 2024 2:20am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 5, 2024 2:20am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 5, 2024 2:20am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 5, 2024 2:20am

Copy link

changeset-bot bot commented Oct 4, 2024

⚠️ No Changeset found

Latest commit: 5c6f288

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link

graphite-app bot commented Oct 4, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Contributor

github-actions bot commented Oct 4, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 42.1 KB (0%) 842 ms (0%) 280 ms (-33.42% 🔽) 1.2 s
thirdweb (cjs) 101.73 KB (0%) 2.1 s (0%) 648 ms (-17.48% 🔽) 2.7 s
thirdweb (minimal + tree-shaking) 4.82 KB (0%) 97 ms (0%) 97 ms (+298.02% 🔺) 193 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 15 ms (+267.83% 🔺) 25 ms
thirdweb/react (minimal + tree-shaking) 17.23 KB (0%) 345 ms (0%) 105 ms (+121.38% 🔺) 449 ms

Copy link

codecov bot commented Oct 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.61%. Comparing base (4660e0c) to head (5c6f288).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4920   +/-   ##
=======================================
  Coverage   47.61%   47.61%           
=======================================
  Files        1057     1057           
  Lines       57241    57241           
  Branches     3926     3925    -1     
=======================================
  Hits        27256    27256           
  Misses      29296    29296           
  Partials      689      689           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 4660e0c
packages 43.37% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
...b/src/react/core/hooks/contract/useReadContract.ts 47.91% <ø> (ø)
packages/thirdweb/src/transaction/read-contract.ts 75.71% <ø> (ø)

... and 2 files with indirect coverage changes

@@ -111,7 +111,7 @@ export type ReadContractOptions<
*
* const { data, isLoading } = useReadContract({
* contract,
* method: "function tokenURI(uint256 tokenId) returns (string)"}),
* method: "function tokenURI(uint256 tokenId) returns (string)"),
Copy link
Member

Choose a reason for hiding this comment

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

same here

Copy link
Member

Choose a reason for hiding this comment

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

good bot :D

Copy link
Member

Choose a reason for hiding this comment

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

Ser. Still wrong here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm? i updated the code ser

Copy link
Member

Choose a reason for hiding this comment

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

There's still an extra ')' in there at the end no?

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 think the bot comment got us confused. I did update this part, can no longer see the extra ")" in the code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the comment should resolved on itself, but since we are using this thread maybe thats why it did

Copy link
Member

Choose a reason for hiding this comment

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

Oh yeah that must be it. Looks fine on gh

Copy link
Member

@joaquim-verges joaquim-verges left a comment

Choose a reason for hiding this comment

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

good bot

Copy link

graphite-app bot commented Oct 5, 2024

Merge activity

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on updating the `useReadContract` function calls in two files by adding a comma to the method definition for better syntax clarity.

### Detailed summary
- In `packages/thirdweb/src/transaction/read-contract.ts`:
  - Added a comma after the method definition for `tokenURI`.

- In `packages/thirdweb/src/react/core/hooks/contract/useReadContract.ts`:
  - Added a comma after the method definition for `tokenURI`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants