MetaMask / metamask-mobile

Mobile web browser providing access to websites that use the Ethereum blockchain
https://metamask.io
Other
2.18k stars 1.12k forks source link

refactor: remove global network from transaction controller #12321

Open matthewwalsh0 opened 1 week ago

matthewwalsh0 commented 1 week ago

Description

Upgrade @metamask/transaction-controller to remove all usages of the global network.

Specifically:

Related issues

Fixes: #3499

Manual testing steps

Full regression of all transaction flows.

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

socket-security[bot] commented 1 week ago

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

Package New capabilities Transitives Size Publisher
npm/@metamask/controller-utils@11.4.3 network 0 264 kB metamaskbot

🚮 Removed packages: npm/@metamask/controller-utils@11.4.2

View full report↗︎

github-actions[bot] commented 1 week ago

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 93dde7c28fc6717303de7b21f2c16393c20fbadc Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/743430ce-5215-4107-882e-c4cf472944c3

[!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[bot] commented 1 week ago

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 753e7a4cec65428eef2dd4e764575c6fdb3234f7 Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/b04c4fe3-cdd6-47ad-a83a-2cc9e3980695

[!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

[!TIP]

  • Check the documentation if you have any doubts on how to understand the failure on bitrise
sonarcloud[bot] commented 6 days ago

Quality Gate Failed Quality Gate failed

Failed conditions
57.4% Coverage on New Code (required ≥ 60%)

See analysis details on SonarQube Cloud

github-actions[bot] commented 6 days ago

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 0ec821714880e12a84911760bf9b4509ec9283ab Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/3914c865-c651-46f7-a9ce-ac9b1edcb5ed

[!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
sleepytanya commented 6 days ago

Bitrise QA builds https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/256a579f-cde8-4d78-a063-4c08f56d1da8?tab=workflows

  1. Speed up / Cancel /queueing work normally

  2. When a user attempts to customize the transaction nonce, the nonce values are displayed as "Undefined" or "Not a Number":

Screenshot 2024-11-19 at 22 15 23

iOS

https://github.com/user-attachments/assets/ba0d186e-35d4-4c63-9892-321ea3720685

Android

https://github.com/user-attachments/assets/26c8f9fc-b998-44c0-b1a7-485c45c47ccb

  1. After completing several successful transactions, chainID error appears, preventing further transactions from being created, present on all Popular networks:

iOS

IMG_0311

Android

https://github.com/user-attachments/assets/236f788d-d233-4e50-a9a0-1328736d2ff1

sleepytanya commented 4 days ago

@matthewwalsh0 the undefined is not an object (evaluating n.chainId) is also present in RC 7.36.0

https://github.com/user-attachments/assets/c3d3c792-0380-4e08-a01d-b7a94084d229

sleepytanya commented 3 days ago

Main build https://app.bitrise.io/app/be69d4368ee7e86d/installable-artifacts/b2bf9484b6bdf580

Nonce error is not present:

Screenshot 2024-11-22 at 10 45 52