-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Allow null-ish properties in TypedData domains to imply unspecified #3623
Comments
I tend to agree that undefined should be treated as not specified. I would also expand this to But one quick note is that Typescript can distinguish a missing field (i.e. Moving this to an enhancement, which will probably be included in v6. :) |
I meant at the type level. A function that accepts an argument of type The concrete example here is that the expression |
Added in v6. I'll leave open to remind me for the next minor bump of v5. |
Ethers Version
5.7.2
Search Terms
hashDomain
Describe the Problem
hashDomain
throws an error when the argument is a domain object withname: undefined
. Note that it correctly processes a domain object with noname
at all, because it's an optional field. Aname
field with anundefined
value should be treated the same way, if only because TypeScript can't distinguish a missing field from an undefined-valued field.This probably applies to all the other optional domain fields as well, though I haven't tested.
Code Snippet
Contract ABI
No response
Errors
Environment
No response
Environment (Other)
No response
The text was updated successfully, but these errors were encountered: