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: add source when local PPOM fails #12460

Merged
merged 5 commits into from
Nov 29, 2024
Merged

Conversation

vinistevam
Copy link
Contributor

@vinistevam vinistevam commented Nov 27, 2024

Description

This PR fixes an issue where the source property was not being set correctly when an error occurred during local PPOM validation. Previously, if the local PPOM failed, the error handling mechanism would add an error message but omit the source property, making it unclear whether the error originated from the API or the local PPOM.

Changes introduced:

  • Modified error handling for the local PPOM validation to ensure that the source property is correctly set to "local" when an error occurs during local validation.
  • Ensured that the source property is properly set to "api" in case of an API failure.

Related issues

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

Manual testing steps

  1. Go to the live test dapp
  2. Trigger a send transaction with suggested gas values (ie Send Legacy or send EIP1559)
  3. Check Segment

Obs: We need to block the network calls for https://security-alerts.api.cx.metamask.io/ and https://static.cx.metamask.io/api/v1/confirmations/ppom/ppom_version.json in the Chrome dev tools > network tab.

Screenshots/Recordings

security-alerts-local.webm

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.

@vinistevam vinistevam added the team-confirmations Push issues to confirmations team label Nov 27, 2024
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.

@vinistevam vinistevam added No E2E Smoke Needed If the PR does not need E2E smoke test run Run Smoke E2E Triggers smoke e2e on Bitrise and removed No E2E Smoke Needed If the PR does not need E2E smoke test run labels Nov 27, 2024
Copy link
Contributor

github-actions bot commented Nov 27, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 7a47ee4
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/997692e3-7d64-4a22-adec-414258cc5de8

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

@MetaMask MetaMask deleted a comment from sonarqubecloud bot Nov 27, 2024
@vinistevam vinistevam force-pushed the fix/add-source-ppom-fails branch from 7a47ee4 to dda0a6b Compare November 27, 2024 13:18
@vinistevam vinistevam force-pushed the fix/add-source-ppom-fails branch from dda0a6b to cdf112f Compare November 27, 2024 13:19
@vinistevam vinistevam added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 27, 2024
@vinistevam vinistevam marked this pull request as ready for review November 27, 2024 13:20
@vinistevam vinistevam requested a review from a team as a code owner November 27, 2024 13:20
Copy link
Contributor

github-actions bot commented Nov 27, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 5d56ed5
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/50915e5d-0541-4c71-8d21-8b5b88da1d7b

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

@vinistevam vinistevam added this pull request to the merge queue Nov 29, 2024
Merged via the queue into main with commit a6e7175 Nov 29, 2024
37 checks passed
@vinistevam vinistevam deleted the fix/add-source-ppom-fails branch November 29, 2024 15:05
@github-actions github-actions bot locked and limited conversation to collaborators Nov 29, 2024
@metamaskbot metamaskbot added the release-7.38.0 Issue or pull request that will be included in release 7.38.0 label Nov 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.38.0 Issue or pull request that will be included in release 7.38.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants