Skip to content

Conversation

@Brunonascdev
Copy link
Contributor

@Brunonascdev Brunonascdev commented Nov 12, 2025

Description

This PR addresses two issues related to the Card feature and onboarding experience:

  • Delegation refresh issue: After completing a successful delegation, some data were not properly updated when navigating back to the CardHome screen. This fix ensures all relevant data refresh correctly to reflect the latest state.
  • KYC WebView permissions: Removed a property that was preventing the KYC WebView during onboarding from requesting camera and microphone access, restoring the expected behavior for KYC verification.

Changelog

CHANGELOG entry: Data not refreshing properly on CardHome after successful delegation
CHANGELOG entry: KYC WebView not requesting camera and microphone access during onboarding

Related issues

Fixes:

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

Adds a post-delegation delay and cache clear to refresh Card data, consolidates loading/navigation handling, removes token priority update, and re-enables KYC camera/mic prompts.

  • Card — Spending Limit (app/components/UI/Card/Views/SpendingLimit/SpendingLimit.tsx):
    • Aggregate loading state via isProcessing + isDelegationLoading (isLoading); block back/cancel while loading; update button disabled/loading states.
    • On confirm: validate SDK (error toast if missing), submit delegation, wait 3s, dispatch(clearCacheData('card-external-wallet-details')), show success toast, then navigate back.
    • Remove token priority update flow and related utilities; simplify logic.
  • Tests (SpendingLimit.test.tsx):
    • Remove token-priority mocks/tests; adjust expectations to await 3s delay, cache clear, success toast, and navigation.
    • Add/modify loading and navigation blocking/cancel behavior tests.
  • Onboarding — KYC WebView (app/components/UI/Card/components/Onboarding/KYCWebview.tsx):
    • Remove mediaCapturePermissionGrantType to allow camera/microphone permission prompts.

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

@Brunonascdev Brunonascdev self-assigned this Nov 12, 2025
@Brunonascdev Brunonascdev added the team-card Card Team label Nov 12, 2025
@Brunonascdev Brunonascdev requested a review from a team as a code owner November 12, 2025 15:18
@github-actions
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.

klejeune
klejeune previously approved these changes Nov 12, 2025
@Brunonascdev Brunonascdev added the skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. label Nov 12, 2025
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
78.4% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@Brunonascdev Brunonascdev added this pull request to the merge queue Nov 12, 2025
Merged via the queue into main with commit c5465d6 Nov 12, 2025
69 of 71 checks passed
@Brunonascdev Brunonascdev deleted the fix/mm-card-delegation-refresh-issue branch November 12, 2025 20:08
@github-actions github-actions bot locked and limited conversation to collaborators Nov 12, 2025
@metamaskbot metamaskbot added the release-7.60.0 Issue or pull request that will be included in release 7.60.0 label Nov 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.60.0 Issue or pull request that will be included in release 7.60.0 size-L skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. team-card Card Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants