Skip to content

chore: Update TransactionController to v13 and ApprovalController to v3.5.2#9088

Merged
tommasini merged 45 commits intomainfrom
feat/1614-tx-controller-approval-controller-update
May 6, 2024
Merged

chore: Update TransactionController to v13 and ApprovalController to v3.5.2#9088
tommasini merged 45 commits intomainfrom
feat/1614-tx-controller-approval-controller-update

Conversation

@tommasini
Copy link
Contributor

@tommasini tommasini commented Mar 28, 2024

Description

  • Update patches of approval controller and Transaction controller accordingly to the core branch
  • Created a script for the approval controller and updated the script for transaction controller patch

Transaction Controller v9 breaking changes:

  • Remove fetchAll method ✅ (Already addressed on the past)
  • Remove prepareUnsignedEthTx and getCommonConfiguration methods ✅ (no changes needed)
  • Update properties of RemoteTransactionSourceRequest type ✅ (no changes needed)
  • Move all but first argument to options bag in addTransaction method ✅ (Already addressed on the past)
  • Add isSupportedNetwork method to RemoteTransactionSource interface ✅ (no changes needed)
  • Add required getSelectedAddress callback argument to constructor ✅ (Already addressed on the past)

Transaction Controller v10 breaking changes:

  • Rename rawTransaction to rawTx in the transaction metadata
    rawTransaction could be found on the first layer of TransactionMetadata (I can't identify this on the store data, will tag the confirmations team to review this migration) 🧪

TransactionController v11 breaking changes:

  • Rename the transactionHash property to hash in the transaction metadata 🧪
  • Add disableSendFlowHistory constructor option ✅ (added on the current work)
  • Add disableHistory constructor option ✅ (added on the current work)
  • Rename the transaction object to txParams in the transaction metadata 🧪
  • Remove incomingTransactions.apiKey constructor option ✅ (added on the current work)
  • Remove unused FetchAllOptions type from TransactionController ✅ (No changes needed)
  • Remove apiKey property from RemoteTransactionSourceRequest type (I can't identify but it seems that there is no changes needed on our side)

TransactionController v12 breaking changes:

  • Change TransactionMeta.chainId to be required ✅ (no changes needed)
  • Use only chainId to determine if a transaction belongs to the current network ✅ (no changes needed)

TransactionController v13 breaking changes:

  • Add required getCurrentNetworkEIP1559Compatibility callback arguments to constructor ✅ (added on the current work)

🧪 - It was tested while debugging but better re-test when every bug is fixed

QUESTION FOR CONFIRMATIONS TEAM:

  • Make sure SubmitHistoryEntry didn't rename rawTransaction property to rawTx. (History is disabled here)
  • Make sure that readableValue property is correctly used on this line since it doesn't exist on TransactionParams
  • multiLayerL1FeeTotal property is correctly used on this line since since it doesn't exist on TransactionParams?

Related issues

Fixes: https://github.com/MetaMask/mobile-planning/issues/1627

Manual testing steps

QA build for testing: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/0ce45ce4-6a8a-4501-a9e5-97cf835df703

Perform transaction regression

Screenshots/Recordings

https://docs.google.com/document/d/1ctuiK-J8M_n-h_HWRde7Odyttyo3VlLWI5D9tn4YCI8/edit

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask 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.

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.

…rdingly to the core branch, created a script for the approval controller and updated the script for transaction controller patch
@github-actions
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.

@socket-security
Copy link

socket-security bot commented Mar 28, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@metamask/[email protected] Transitive: environment, network +43 8.79 MB metamaskbot

🚮 Removed packages: npm/@metamask/[email protected], npm/@metamask/[email protected]

View full report↗︎

@codecov-commenter
Copy link

codecov-commenter commented Mar 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.55%. Comparing base (543d671) to head (fcbc49e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9088      +/-   ##
==========================================
- Coverage   45.55%   45.55%   -0.01%     
==========================================
  Files        1272     1272              
  Lines       31238    31238              
  Branches     3189     3189              
==========================================
- Hits        14232    14231       -1     
- Misses      16167    16168       +1     
  Partials      839      839              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@socket-security
Copy link

socket-security bot commented Mar 28, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

@tommasini tommasini added team-confirmations-system-deprecated DEPRECATED: please use "team-confirmations" instead team-mobile-platform Mobile Platform team labels Apr 11, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Apr 30, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: dfdd382
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/e9f422b3-6c5c-498a-acea-d62cbde4f3a8

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@legobeat legobeat requested review from a team, OGPoyraz, jpuri and seaona May 1, 2024 02:09
@legobeat legobeat mentioned this pull request May 3, 2024
7 tasks
@seaona
Copy link
Member

seaona commented May 3, 2024

thank you for the recording uploads @tommasini . I think the PR looks good from QA seeing the issues have been fixed
I shared the PR with @sleepytanya and @pnarayanaswamy in the case something else is needed

@dbrans dbrans requested a review from a team May 3, 2024 14:32
@github-actions
Copy link
Contributor

github-actions bot commented May 3, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: c226b61
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/2311f10b-8c6c-43b6-b69d-3dfdea243f68

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: d7f186e
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/b4065e07-5c5a-46db-8cf6-ccd413689dd5

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@sonarqubecloud
Copy link

sonarqubecloud bot commented May 4, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
9.5% Duplication on New Code (required ≤ 4%)

See analysis details on SonarCloud

Copy link
Contributor

@legobeat legobeat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@sethkfman sethkfman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tommasini tommasini merged commit 39f43bc into main May 6, 2024
@tommasini tommasini deleted the feat/1614-tx-controller-approval-controller-update branch May 6, 2024 17:30
@github-actions github-actions bot locked and limited conversation to collaborators May 6, 2024
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label May 6, 2024
@metamaskbot metamaskbot added the release-7.23.0 Issue or pull request that will be included in release 7.23.0 label May 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.23.0 Issue or pull request that will be included in release 7.23.0 team-confirmations-system-deprecated DEPRECATED: please use "team-confirmations" instead team-mobile-platform Mobile Platform team

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.