Skip to content

Commit

Permalink
fix: fix edge case for referencing verifyingContract
Browse files Browse the repository at this point in the history
  • Loading branch information
jnicoulaud-ledger committed Oct 11, 2024
1 parent a7aa5f2 commit 8984bfd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/erc7730/convert/convert_erc7730_to_eip712.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ def convert_field_description(cls, field: ResolvedFieldDescription, prefix: str
case FieldFormat.TOKEN_AMOUNT:
if field.params is not None and isinstance(field.params, TokenAmountParameters):
asset_path = field.params.tokenPath if prefix is None else f"{prefix}.{field.params.tokenPath}"

# FIXME edge case for referencing verifyingContract, this will be handled cleanly in #65
if asset_path == "@.to":
asset_path = None

field_format = LegacyEIP712Format.AMOUNT
case FieldFormat.AMOUNT:
field_format = LegacyEIP712Format.AMOUNT
Expand Down

0 comments on commit 8984bfd

Please sign in to comment.