{
  "prNumber": 44326,
  "prTitle": "release: 13.40.0",
  "generatedAt": "2026-07-16T20:30:40.898Z",
  "modelUsed": "gpt-5",
  "summary": {
    "totalFilesChanged": 1314,
    "totalCommitsInRelease": 191,
    "releaseRiskScore": "48/100",
    "highRiskScenarios": 4,
    "mediumRiskScenarios": 7
  },
  "testScenarios": {
    "cherryPickScenarios": [
      {
        "area": "Token Management — Non-EVM token search/import (unified assets)",
        "riskLevel": "high",
        "testSteps": [
          "1. Using a non-EVM account (e.g., Tron via Snap), open Import tokens and search for a known non-EVM asset; import it and verify symbol, icon, and decimals are correct and balance fetches.",
          "2. Perform the same search on an EVM account; verify results are scoped correctly (no non-EVM duplicates) and metadata remains accurate.",
          "3. Remove the imported non-EVM asset, refresh the account view, and re-import to confirm consistency."
        ],
        "whyThisMatters": "Cherry-pick 44361 fixes unified asset seeding for non-EVM search imports; a regression would break token discovery or show wrong metadata for non-EVM ecosystems."
      },
      {
        "area": "Networks — Add Robinhood Chain as a featured network",
        "riskLevel": "medium",
        "testSteps": [
          "1. Open Add a network and verify Robinhood Chain appears under Featured with expected name/icon.",
          "2. Add and switch to Robinhood Chain; verify network banner shows correct chain name/currency and the account view loads without RPC errors.",
          "3. Connect a dapp while on Robinhood Chain and verify the reported chain ID and network name are correct; switch back to Ethereum and confirm the switch completes cleanly."
        ],
        "whyThisMatters": "Cherry-pick 44346 adds a new featured network; misconfiguration (RPC, chain ID, currency) can prevent connections or cause users to transact on the wrong chain."
      },
      {
        "area": "Activity — Duplicate pending transaction rows",
        "riskLevel": "medium",
        "testSteps": [
          "1. On an EVM network, submit a transaction that remains pending briefly; open Activity and verify only one pending entry is shown.",
          "2. Speed up or cancel the transaction; verify the list updates to one confirmed/cancelled entry with no duplicates.",
          "3. Reload or lock/unlock the extension; confirm no phantom pending rows reappear."
        ],
        "whyThisMatters": "Cherry-pick 44370 fixes an extra pending row from local state; duplicates confuse users and can lead to incorrect follow-up actions."
      },
      {
        "area": "Security/UX — Scam questionnaire gated by LaunchDarkly flag",
        "riskLevel": "medium",
        "testSteps": [
          "1. With the LD flag Off, perform an action that previously surfaced the scam questionnaire (e.g., after a relevant risk trigger); verify the questionnaire does not appear and the flow continues normally.",
          "2. With the LD flag On (staging/dev), trigger the same flow; verify the questionnaire appears, completing or dismissing returns you to the prior screen without breaking navigation.",
          "3. Toggle the flag between runs and ensure the UI only reflects changes on the next trigger and never gets stuck in an in-between state."
        ],
        "whyThisMatters": "Cherry-pick 44582 gates the scam questionnaire behind a flag; incorrect gating could hide necessary education or inappropriately block critical flows."
      }
    ],
    "initialScenarios": [
      {
        "area": "State Migrations (Migration 216 + seedless onboarding data)",
        "riskLevel": "high",
        "testSteps": [
          "1. On 13.39.x, create a new SRP wallet, add a second account, enable MetaMetrics, add a custom network (e.g., Arbitrum) and import at least one custom token.",
          "2. Upgrade the same profile to 13.40.0 and unlock.",
          "3. Verify all accounts are present, the previously selected network is preserved, token list and balances load without errors, and the Activity tab renders normally.",
          "4. Send a small native token transfer on the previously selected network and confirm it completes, with Activity updates reflected correctly."
        ],
        "whyThisMatters": "Migrations can corrupt user state (accounts, networks, tokens) or cause load failures; verifying upgrade integrity prevents data loss and broken post-upgrade flows."
      },
      {
        "area": "Onboarding (Seedless/Passkey) flow and resume",
        "riskLevel": "high",
        "testSteps": [
          "1. Fresh install 13.40.0 and start onboarding; choose the Seedless/Passkey (email/passkey) option if available and proceed to the authentication step.",
          "2. Close the extension mid-flow (e.g., close the popup or reload the extension), then reopen MetaMask.",
          "3. Confirm the onboarding resumes at the correct step rather than restarting; complete onboarding and land on the account view.",
          "4. Lock and unlock; sign a test message to confirm the created account is usable and persisted."
        ],
        "whyThisMatters": "New or migrated seedless onboarding state can get stuck or reset, blocking new users from completing setup or producing unusable accounts."
      },
      {
        "area": "Analytics/MetaMetrics consent and event collection (controller refactor)",
        "riskLevel": "high",
        "testSteps": [
          "1. In Settings > Security & privacy, turn MetaMetrics Off; with the browser DevTools Network tab open, switch accounts and navigate token details; verify no analytics/telemetry requests are sent.",
          "2. Turn MetaMetrics On and accept consent; repeat the same actions and verify exactly one analytics event per action (no duplicates).",
          "3. Lock and unlock or reload the extension; verify the consent state persists and you are not re-prompted unexpectedly."
        ],
        "whyThisMatters": "A refactor to analytics controllers/adapters risks silent failures, duplicate events, or privacy regressions that affect user trust and app stability."
      },
      {
        "area": "Token Management — Asset list sorting and search",
        "riskLevel": "medium",
        "testSteps": [
          "1. On the Tokens tab with 5+ assets, open the sort control and switch between sorting by Balance and A–Z; verify the order updates correctly each time.",
          "2. Use the search field to filter to a specific token by name/symbol; verify the filtered list is correct.",
          "3. Clear the search; verify the full list returns and the previously selected sort order persists after navigating away and back."
        ],
        "whyThisMatters": "Large UI changes to the asset list, control bar, and sort control can break discoverability, ordering, or persistence of user preferences."
      },
      {
        "area": "Token Management — Inactive token badge and actions",
        "riskLevel": "medium",
        "testSteps": [
          "1. On the Tokens tab, locate any token labeled with an 'Inactive' badge (import one if needed) and open its details screen.",
          "2. Attempt Send and Swap from the inactive token’s details; confirm flows open and any warnings render correctly without blocking or crashing.",
          "3. Remove the token and re-import it; verify the 'Inactive' badge behavior is consistent and the token row renders stably."
        ],
        "whyThisMatters": "A new inactive-asset badge surfaces risk to users; regressions could hide warnings or incorrectly block legitimate actions."
      },
      {
        "area": "DeFi portfolio list — empty state and protocol cells",
        "riskLevel": "medium",
        "testSteps": [
          "1. Open Portfolio > DeFi; if you have no positions, verify the empty state copy/illustration render and the CTA link opens the correct destination in a new tab.",
          "2. With at least one DeFi position, verify protocol rows show correct protocol name, network, and value; click a row and confirm it opens the expected detail/external link.",
          "3. Switch networks and return to DeFi; verify the list refreshes without errors or stale data."
        ],
        "whyThisMatters": "UI changes to DeFi list cells and empty states can break navigation or misrepresent balances, confusing users about their positions."
      },
      {
        "area": "Network switching consistency with asset list",
        "riskLevel": "medium",
        "testSteps": [
          "1. Switch between Ethereum Mainnet and at least two other networks; verify the token list updates to the correct network scope (no stale tokens from prior network).",
          "2. Change the asset list sort on a non-Mainnet network, then switch back to Mainnet; verify sort preference persists appropriately.",
          "3. From a connected dapp, approve a network switch request; verify the UI shows the correct new network name/symbol and the asset list refreshes correctly."
        ],
        "whyThisMatters": "Wide UI and controller churn can cause cross-network state leakage or stale lists, leading to wrong balances or actions on the wrong chain."
      }
    ]
  }
}