Skip to content

Conversation

@OGPoyraz
Copy link
Member

@OGPoyraz OGPoyraz commented Nov 11, 2025

Description

This PR aims to add PPOM validation requests for deeplinks.

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://github.com/MetaMask/mobile-planning/issues/2370
Fixes: #17358

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

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.

Note

Integrates PPOM validation into deeplink transfer/approve flows, generating a securityAlertId and passing it to addTransaction, with refactors and tests.

  • Deeplink handling (app/components/Views/confirmations/utils/deeplink.ts):
    • Add validateWithPPOM to build a PPOM request (with uuid-based securityAlertId) and call ppomUtil.validateRequest.
    • Pass returned securityAlertResponse to addTransaction for both native and ERC20 transfers.
    • Refactor tx construction to derive txParams and transactionType; downgrade duplicate-request log from error to log.
  • Approve flow (app/core/DeeplinkManager/TransactionManager/approveTransaction.ts):
    • Compute chainId/networkClientId, call validateWithPPOM, and include securityAlertResponse in addTransaction.
  • Tests:
    • Extend deeplink and approve tests to mock PPOM and UUID, assert PPOM validation payload, securityAlertResponse, and networkClientId wiring.

Written by Cursor Bugbot for commit daa4941. This will update automatically on new commits. Configure here.

@OGPoyraz OGPoyraz requested review from a team as code owners November 11, 2025 10:00
@metamaskbot metamaskbot added the team-confirmations Push issues to confirmations team label Nov 11, 2025

// Temporary solution for preventing back to back deeplink requests
if (isAddingDeeplinkTransaction) {
Logger.error(new Error('Cannot add another deeplink transaction'));
Copy link
Member Author

Choose a reason for hiding this comment

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

This is causing false positives in the Sentry logs - hence we are decreasing it to log instead of error.

See comment here: #17358 (comment)

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size-M team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Sentry] Error: Cannot add another deeplink transaction

3 participants