Commit 294f783
authored
fix: make domain.name optional in v2 to legacy EIP-712 conversion (#283)
Some EIP-712 contracts (e.g. Safe) do not include a `name` field in
their EIP712Domain. The v2 to legacy EIP-712 converter was requiring
`domain.name` to be present and failing with "Missing domain name"
when it was absent.
Make `dapp_name` fall back to `metadata.owner` when `domain.name` is
not set, so descriptors for contracts with a minimal EIP712Domain
(e.g. only chainId + verifyingContract) can still be converted.
Made-with: Cursor1 parent 83ba8bb commit 294f783
1 file changed
Lines changed: 3 additions & 8 deletions
Lines changed: 3 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | 486 | | |
495 | 487 | | |
496 | 488 | | |
| |||
499 | 491 | | |
500 | 492 | | |
501 | 493 | | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
502 | 497 | | |
503 | 498 | | |
504 | 499 | | |
| |||
0 commit comments