Skip to content
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

fix: [cherrypick][V12.3.0] Redesign Signature Message date values #27305

Open
wants to merge 3 commits into
base: Version-v12.3.0
Choose a base branch
from

Conversation

digiwand
Copy link
Contributor

@digiwand digiwand commented Sep 20, 2024

Description

Cherry-pick #27249 for v12.3.0

Fix date values:

  • Formerly, conversations were converting values as if they were milliseconds. However, these values come from Solidity where these timestamps are unix timestamps in seconds.
  • Support -1 (no expiration) value
  • Display "expiry" as a date instead of a unix timestamp

This PR fixes the conversion.

Open in GitHub Codespaces

Fixes: #27137

  1. Go to test-dapp
  2. Request Permit or another TypedSign request
  3. Observe deadlines and dates

  • I've followed MetaMask Contributor Docs and MetaMask Extension Coding
    Standards
    .

  • I've completed the PR template to the best of my ability

  • I’ve included tests if applicable

  • I’ve documented my code using JSDoc format if applicable

  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).

  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Fix date values:
- Formerly, conversations were converting values as if they were
milliseconds. However, these values come from Solidity where these
timestamps are unix timestamps in seconds.
- Support -1 (no expiration) value
- Display "expiry" as a date instead of a unix timestamp

This PR fixes the conversion.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27249?quickstart=1)

Fixes: #27137

1. Go to test-dapp
2. Request Permit or another TypedSign request
3. Observe deadlines and dates

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

<img width="320"
src="https://github.com/user-attachments/assets/855fc4a5-5a1b-4575-bfda-40b5b6688fe3">

<img width="320"
src="https://github.com/user-attachments/assets/0bc90b15-daa7-4537-9cd1-8727000899b2">

<img width="320"
src="https://github.com/user-attachments/assets/e1beb4f9-2b41-4ef9-8190-8264d88c9ab0">

<img width="320"
src="https://github.com/user-attachments/assets/edb4d259-29a3-4558-8858-e5b619c0ce18">

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
@digiwand digiwand requested review from a team as code owners September 20, 2024 13:10
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Sep 20, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [06e2114]
Page Load Metrics (1788 ± 89 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint29022631710373179
domContentLoaded15572162175117182
load15952289178818589
domInteractive156536136

@digiwand digiwand added the release-12.3.0 Issue or pull request that will be included in release 12.3.0 label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
INVALID-PR-TEMPLATE PR's body doesn't match template release-12.3.0 Issue or pull request that will be included in release 12.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants