Skip to content

[Signature Redesign] fixes to PermitBatch and PermitBatchTransferFrom simulation #26592

@bschorchit

Description

@bschorchit

What is this about?

Within the estimated changes section, we should:

  • display the token address for each token in the payload instead of verifyingContract address
  • display the amount and fiat conversion information for each token in the payload

Scenario

No response

Design

Current UI:
Screenshot 2024-08-21 at 14 47 06

Desired UI:

Screenshot 2024-08-15 at 16 42 20

Figma file

Technical Details

  • See type definition here.
  • See random example transaction including signature here.

Example signature payload:

{
    "types": {
        "PermitBatch": [
            {
                "name": "details",
                "type": "PermitDetails[]"
            },
            {
                "name": "spender",
                "type": "address"
            },
            {
                "name": "sigDeadline",
                "type": "uint256"
            }
        ],
        "PermitDetails": [
            {
                "name": "token",
                "type": "address"
            },
            {
                "name": "amount",
                "type": "uint160"
            },
            {
                "name": "expiration",
                "type": "uint48"
            },
            {
                "name": "nonce",
                "type": "uint48"
            }
        ],
        "EIP712Domain": [
            {
                "name": "name",
                "type": "string"
            },
            {
                "name": "chainId",
                "type": "uint256"
            },
            {
                "name": "verifyingContract",
                "type": "address"
            }
        ]
    },
    "domain": {
        "name": "Permit2",
        "chainId": "1",
        "verifyingContract": "0x000000000022d473030f116ddee9f6b43ac78ba3"
    },
    "primaryType": "PermitBatch",
    "message": {
        "details": [{
            "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "amount": "1461501637330902918203684832716283019655932542975",
            "expiration": "1722887542",
            "nonce": "5"
        }, {
            "token": "0xb0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "amount": "2461501637330902918203684832716283019655932542975",
            "expiration": "1722887642",
            "nonce": "6"
        }],
        "spender": "0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
        "sigDeadline": "1720297342"
    }
}

Threat Modeling Framework

No response

Acceptance Criteria

No response

Stakeholder review needed before the work gets merged

  • Engineering (needed in most cases)
  • Design
  • Product
  • QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
  • Security
  • Legal
  • Marketing
  • Management (please specify)
  • Other (please specify)

References

No response

Metadata

Metadata

Assignees

Labels

regression-RC-12.3.0Regression bug that was found in release candidate (RC) for release 12.3.0release-12.3.0Issue or pull request that will be included in release 12.3.0release-blockerThis bug is blocking the next releaseteam-confirmationsPush issues to confirmations teamtype-bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions