Skip to content

Conversation

@kumaryash90
Copy link
Member

@kumaryash90 kumaryash90 commented Feb 12, 2025

TOOL-3401

Dashboard handles single unnamed param as "*". Handle this in sdk. Throw error for all other cases.


PR-Codex overview

This PR enhances the normalizeFunctionParams function to handle cases where parameter names are either missing or empty. It also updates the associated tests to verify these new conditions.

Detailed summary

  • Updated the condition to check for both undefined and empty string parameter names.
  • Added a comment for future handling of multiple unnamed parameters.
  • Modified tests to cover cases with empty string parameter names.
  • Verified that unnamed parameters can be returned when provided.

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

@kumaryash90 kumaryash90 requested review from a team as code owners February 12, 2025 23:29
@changeset-bot
Copy link

changeset-bot bot commented Feb 12, 2025

⚠️ No Changeset found

Latest commit: e201e3d

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

@vercel
Copy link

vercel bot commented Feb 12, 2025

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 Feb 14, 2025 6:30am
login ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 14, 2025 6:30am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 14, 2025 6:30am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 14, 2025 6:30am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 14, 2025 6:30am

@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Feb 12, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Feb 12, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 46.3 KB (0%) 926 ms (0%) 385 ms (+30.9% 🔺) 1.4 s
thirdweb (cjs) 121.89 KB (0%) 2.5 s (0%) 894 ms (+25.23% 🔺) 3.4 s
thirdweb (minimal + tree-shaking) 5.6 KB (0%) 112 ms (0%) 174 ms (+399.6% 🔺) 286 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 30 ms (+148.55% 🔺) 40 ms
thirdweb/react (minimal + tree-shaking) 19.29 KB (0%) 386 ms (0%) 86 ms (-23.67% 🔽) 472 ms

@codecov
Copy link

codecov bot commented Feb 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.85%. Comparing base (c8ef941) to head (e201e3d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6242      +/-   ##
==========================================
- Coverage   56.86%   56.85%   -0.02%     
==========================================
  Files        1166     1166              
  Lines       64523    64526       +3     
  Branches     5226     5223       -3     
==========================================
- Hits        36694    36686       -8     
- Misses      27101    27115      +14     
+ Partials      728      725       -3     
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from c8ef941
packages 55.06% <100.00%> (-0.02%) ⬇️

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

Files with missing lines Coverage Δ
.../thirdweb/src/utils/abi/normalizeFunctionParams.ts 100.00% <100.00%> (ø)

... and 6 files with indirect coverage changes

@graphite-app
Copy link
Contributor

graphite-app bot commented Feb 14, 2025

Merge activity

TOOL-3401

Dashboard handles single unnamed param as "*". Handle this in sdk. Throw error for all other cases.

<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enhances the `normalizeFunctionParams` function to handle cases where parameter names may be missing or empty. It introduces error handling for unnamed parameters and updates the associated tests to cover these scenarios.

### Detailed summary
- Updated the condition to check for both `undefined` and empty string in parameter names.
- Added a comment for future handling of multiple unnamed parameters.
- Modified test cases to include checks for empty parameter names.
- Ensured that unnamed parameters can be accessed via the `params["*"]` syntax.

> ✨ 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

packages SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants