-
Notifications
You must be signed in to change notification settings - Fork 399
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
fix: Add validation for getContract params #5780
fix: Add validation for getContract params #5780
Conversation
🦋 Changeset detectedLatest commit: 4be5192 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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. This stack of pull requests is managed by Graphite. Learn more about stacking. |
if (!isAddress(options.address)) { | ||
throw new Error("getContract validation error: Invalid address"); | ||
} | ||
if (!options.chain || !options.chain.id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The check !options.chain.id
will evaluate to true
when chain.id
is 0
, which is a valid chain ID. Consider using typeof options.chain.id !== 'number'
to properly validate the type while allowing zero values.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
size-limit report 📦
|
520487c
to
b740f94
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5780 +/- ##
==========================================
- Coverage 53.02% 53.01% -0.02%
==========================================
Files 1101 1101
Lines 59080 59096 +16
Branches 4809 4813 +4
==========================================
+ Hits 31328 31329 +1
- Misses 27034 27049 +15
Partials 718 718
*This pull request uses carry forward flags. Click here to find out more.
|
Merge activity
|
DASH-540 * on the chat page -> move the container 1 level down - so the chat can be scrolled from the corner of the page as well * reduce container max-width for the history page to 800px to match it with landing page * stop the auto scroll if user interacts with chat UI * custom 404 page for the nebula subdomain * remove the announcement banner from the 404 pages ( this affects entire dashboard) * fix empty title in chat history page * fix overflow in chat history page on mobile when there's a long text without a whitespace <!-- start pr-codex --> --- This PR focuses on enhancing the chat functionality and user experience in the `Nebula` application. It introduces auto-scrolling features, improves layout styling, and adds a new `404 Not Found` page. - Added auto-scrolling feature to `Chats` component. - Introduced `setEnableAutoScroll` function to manage scrolling behavior. - Enhanced styling in `ChatHistoryPage` and `SessionCard`. - Implemented a new `NebulaNotFound` component with a user-friendly 404 message. - Updated `ChatPageContent` to utilize the new auto-scroll functionality. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
b740f94
to
4be5192
Compare
Problem solved
Fixes TOOL-2768
PR-Codex overview
This PR focuses on adding validation to the
getContract
function in thethirdweb
package, ensuring that the provided client, address, and chain are valid before proceeding.Detailed summary
getContract
function:options.client
is provided.options.address
is a valid address usingisAddress
.options.chain
andoptions.chain.id
are provided.