-
Notifications
You must be signed in to change notification settings - Fork 619
Handle single unnamed param #6242
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
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
packages/thirdweb/src/utils/abi/normalizeFunctionParams.test.ts
Outdated
Show resolved
Hide resolved
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
size-limit report 📦
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
*This pull request uses carry forward flags. Click here to find out more.
|
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 -->
7b4f341 to
e201e3d
Compare
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
normalizeFunctionParamsfunction to handle cases where parameter names are either missing or empty. It also updates the associated tests to verify these new conditions.Detailed summary
undefinedand empty string parameter names.