Skip to content

Conversation

@ffmcgee725
Copy link
Member

@ffmcgee725 ffmcgee725 commented Nov 13, 2025

Description

This PR adds to the current implementation of MetaMask Connect toasts to ensure that error messages are displayed in the Wallet when a user rejects a request or when other errors occur during the request lifecycle.

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/WAPI-825

Manual testing steps

Feature: MM Connect toasts for non-success states

  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

Screen.Recording.2025-11-13.at.11.22.04.mov

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

Show an error toast when bridge responses contain JSON-RPC errors and use the connection id for error notifications; add tests for success/error paths.

  • SDKConnectV2:
    • Connection (services/connection.ts): On bridge response, detect JSON-RPC errors (error in payload) and call hostApp.showConnectionError(this.info); otherwise call showReturnToApp(this.info). Always forward payload to client.
    • Host App Adapter (adapters/host-application-adapter.ts): Change showConnectionError signature to conninfo? and use conninfo.id when provided (fallback to timestamp).
    • Types (types/host-application-adapter.ts): Update interface for showConnectionError(conninfo?) and clarify return-to-app success doc.
  • Tests:
    • Add/update cases validating error vs success toasts and that error notifications use the connection id; ensure responses without id don’t trigger return-to-app.

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

@ffmcgee725 ffmcgee725 requested a review from a team as a code owner November 13, 2025 10:35
@metamaskbot metamaskbot added the team-wallet-integrations Wallet Integrations team label Nov 13, 2025
@sonarqubecloud
Copy link

@ffmcgee725 ffmcgee725 enabled auto-merge November 14, 2025 09:43
@ffmcgee725 ffmcgee725 added this pull request to the merge queue Nov 14, 2025
Merged via the queue into main with commit 6ef1fc7 Nov 14, 2025
151 of 154 checks passed
@ffmcgee725 ffmcgee725 deleted the jc/WAPI-825 branch November 14, 2025 10:04
@github-actions github-actions bot locked and limited conversation to collaborators Nov 14, 2025
@metamaskbot metamaskbot added the release-7.61.0 Issue or pull request that will be included in release 7.61.0 label Nov 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.61.0 Issue or pull request that will be included in release 7.61.0 size-M team-wallet-integrations Wallet Integrations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants