Skip to content

feat(ramp): persist Transak native policy agreement for UB2 [TRAM-3340]#28952

Merged
wachunei merged 4 commits into
mainfrom
tram-3340-verify-identity-explainer-once
Apr 20, 2026
Merged

feat(ramp): persist Transak native policy agreement for UB2 [TRAM-3340]#28952
wachunei merged 4 commits into
mainfrom
tram-3340-verify-identity-explainer-once

Conversation

@wachunei

@wachunei wachunei commented Apr 16, 2026

Copy link
Copy Markdown
Member

Description

Unified Buy V2 (Transak native) showed the verify-identity explainer on every visit when the user had no or expired Transak token (TRAM-3340).

This change stores hasAgreedTransakNativePolicy on persisted Redux fiatOrders. When the user taps Continue on the explainer, we dispatch setHasAgreedTransakNativePolicy(true). On later continues with no token, BuildQuote routes straight to Enter Email if selectHasAgreedTransakNativePolicy is true.

Changelog

CHANGELOG entry: Unified Buy users who use Transak native only see the verify-identity policy screen once; later visits skip to email entry when not logged in to Transak.

Related issues

Fixes:

Refs: https://consensyssoftware.atlassian.net/browse/TRAM-3340

Manual testing steps

Feature: Transak native verify-identity explainer (Unified Buy V2)

  Scenario: First visit without Transak token shows explainer then email
    Given the user has not agreed the Transak native policy before
    And the user selects Transak native on Unified Buy amount screen
    When the user continues without a Transak session
    Then the verify-identity explainer is shown
    When the user taps Continue on the explainer
    Then the Enter Email screen is shown

  Scenario: Later visit skips explainer after agreement
    Given the user has already agreed the Transak native policy
    And the user has no valid Transak token
    When the user continues from Unified Buy amount with Transak native
    Then the Enter Email screen is shown without the explainer

Screenshots/Recordings

Before

N/A

After

after.mp4

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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

Low Risk
Small, isolated change to Unified Buy navigation and Redux state with test coverage; main risk is incorrect routing if the persisted flag is set/cleared unexpectedly.

Overview
Unified Buy V2 now persists whether the user has agreed to the Transak-native policy explainer via a new fiatOrders.hasAgreedTransakNativePolicy flag, plus setHasAgreedTransakNativePolicy and selectHasAgreedTransakNativePolicy.

VerifyIdentity dispatches the consent on Continue, and BuildQuote uses the selector to route native-provider users without a token directly to EnterEmail instead of repeatedly showing VerifyIdentity. Tests were updated/added to cover the new reducer state, selector behavior, and the updated navigation paths.

Reviewed by Cursor Bugbot for commit 91e8cd1. Bugbot is set up for automated code reviews on this repo. Configure here.

- Add fiatOrders.hasAgreedTransakNativePolicy with redux-persist
- Skip verify-identity explainer when agreed; route to Enter Email
- Set flag on explainer Continue; tests for reducer, BuildQuote, VerifyIdentity
@wachunei wachunei self-assigned this Apr 16, 2026
@metamaskbotv2 metamaskbotv2 Bot added the team-money-movement issues related to Money Movement features label Apr 16, 2026
@wachunei wachunei marked this pull request as ready for review April 17, 2026 13:51
@wachunei wachunei requested a review from a team as a code owner April 17, 2026 13:51
@github-actions github-actions Bot added the risk-medium Moderate testing recommended · Possible bug introduction risk label Apr 17, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2d649fc. Configure here.

Comment thread app/reducers/fiatOrders/index.test.ts Outdated
@github-actions github-actions Bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Apr 17, 2026
@github-actions github-actions Bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Apr 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeRamps
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: medium
  • AI Confidence: 92%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes are entirely within the Ramp (on-ramp/off-ramp) feature area:

  1. fiatOrders reducer (index.ts, types.ts): Added a new Redux state field hasAgreedTransakNativePolicy (boolean), a new action FIAT_SET_HAS_AGREED_TRANSAK_NATIVE_POLICY, action creator setHasAgreedTransakNativePolicy, and selector selectHasAgreedTransakNativePolicy. This is a straightforward Redux state addition with no side effects on other reducers.

  2. VerifyIdentity.tsx: When the user presses "Continue" on the VerifyIdentity screen, it now dispatches setHasAgreedTransakNativePolicy(true) to persist the policy agreement in Redux state. This is a new side effect added to an existing navigation action.

  3. BuildQuote.tsx: Uses the new selectHasAgreedTransakNativePolicy selector to conditionally skip the VerifyIdentity screen and navigate directly to EnterEmail if the user has already agreed to the policy. This changes the navigation flow for returning Transak native users.

The changes affect the on-ramp purchase flow (BuildQuote → VerifyIdentity → EnterEmail), which is exactly what SmokeRamps tests cover. No other feature areas are impacted:

  • No changes to wallet core, Engine, or controllers
  • No changes to navigation infrastructure shared across features
  • No changes to confirmation flows, account management, or network management
  • No changes to browser, snaps, or trading features

SmokeRamps is the appropriate and sufficient tag to validate these changes.

Performance Test Selection:
No performance-sensitive changes. The modifications are limited to: (1) a simple Redux state boolean field addition, (2) a conditional navigation branch in BuildQuote, and (3) a dispatch call in VerifyIdentity. None of these affect rendering performance, list loading, app startup, or any other performance-critical paths.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
12 value mismatches detected (expected — fixture represents an existing user).
View details

@wachunei wachunei added this pull request to the merge queue Apr 20, 2026
Merged via the queue into main with commit 4265a15 Apr 20, 2026
97 checks passed
@wachunei wachunei deleted the tram-3340-verify-identity-explainer-once branch April 20, 2026 15:41
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 20, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.75.0 Issue or pull request that will be included in release 7.75.0 label Apr 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.75.0 Issue or pull request that will be included in release 7.75.0 risk-medium Moderate testing recommended · Possible bug introduction risk size-M team-money-movement issues related to Money Movement features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants