Skip to content

[BUG] Deadlines under 30 minutes are automatically clipped to 30 minutes. #7855

Open
@AlexNi245

Description

@AlexNi245

When setting the Tx.deadline field in the Settings Modal below 30 minutes, the value automatically clips to 30 minutes. The modal displays the lower value, but the transaction object stores 30 minutes instead.

Steps to Reproduce

  1. Open the Swap UI and select the token pair to trade.
  2. Open the Settings Modal and set the Deadline to 5 minutes.
  3. Close the Settings Modal.
  4. Reopen the Settings Modal — the Deadline is still set to 5 minutes.
  5. Submit the swap.
  6. View the transaction on Etherscan.
  7. Decode the Input Data.
  8. Notice that the deadline field in the transaction data is creationDate + 30min instead of creationDate + 5min.

Expected Behavior

The transaction's deadline field should equal creationDate + user-specific deadline.

Image

The transaction below demonstrates this behavior, set with a 5-minute deadline but an incorrect deadline field in the transaction data.

https://sepolia.etherscan.io/tx/0xe9dd8a1aa07b78e22155dfc8da929462627bda6c8ffe4ea7f9d1c85fb85e5dc0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions