Skip to content

feat: cherry-pick: Conditionally disable nonce editing when smart transactions are… #29897

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

Merged

Conversation

pedronfigueiredo
Copy link
Contributor

@pedronfigueiredo pedronfigueiredo commented Jan 24, 2025

…… (#29891)

… enabled

Cherrypicked PR: #29891

Description

We recently enabled custom nonce editing in all redesigned flows, independently of the custom nonce editing settings toggle. This toggle was still used in the legacy flows that are no longer visible by the user, and it will be removed soon in an upcoming PR.

This resulted in nonce editing being available for smart transactions which is not needed as the user should never need to manipulate nonces of smart transactions. This PR fixes this by removing that option to the user.

If smart transactions are enabled but the transaction is on a chain that doesn't currently support smart transactions, the nonce is still editable.

Open in GitHub Codespaces

Related issues

Fixes: #29841

Manual testing steps

  1. Go to this page... 2.

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • 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.

Description

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • 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.

#29891)

… enabled


<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

We [recently enabled custom nonce editing in all redesigned
flows](#29627),
independently of the custom nonce editing settings toggle. This toggle
was still used in the legacy flows that are no longer visible by the
user, and it will be removed soon in an upcoming PR.

This resulted in nonce editing being available for smart transactions
which is not needed as the user should never need to manipulate nonces
of smart transactions. This PR fixes this by removing that option to the
user.

If smart transactions are enabled but the transaction is on a chain that
doesn't currently support smart transactions, the nonce is still
editable.

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

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

## **Related issues**

Fixes: #29841

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

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

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.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/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] 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.
@pedronfigueiredo pedronfigueiredo added the team-confirmations Push issues to confirmations team label Jan 24, 2025
@pedronfigueiredo pedronfigueiredo self-assigned this Jan 24, 2025
@pedronfigueiredo pedronfigueiredo requested a review from a team as a code owner January 24, 2025 15:42
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
Copy link
Collaborator

Builds ready [142f285]
Page Load Metrics (1827 ± 71 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint30220961709470226
domContentLoaded14652089180414268
load14692094182714771
domInteractive26176584421
backgroundConnect573222010
firstReactRender1596402813
getState483192211
initialActions01000
loadScripts10581685135714268
setupStore663202210
uiStartup169626602142227109

@dbrans dbrans merged commit cd944e5 into Version-v12.11.0 Jan 24, 2025
71 checks passed
@dbrans dbrans deleted the pnf/cherry-pick-nonce-disabled-on-smart-txs branch January 24, 2025 17:40
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants