Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/reject unsupported account methods #22308

Closed
wants to merge 1 commit into from

Conversation

owencraston
Copy link
Contributor

@owencraston owencraston commented Dec 15, 2023

Description

Related issues

prohresses: https://github.com/MetaMask/accounts-planning/issues/121

Manual testing steps

  1. Go to the SSK and create an account
  2. Updated the account using this JSON, replacing the address and ID fields with the new account information, and choose one or more of the methods to remove from the list
{
    "address": "you new account address",
    "id": "your new account ID",
    "options": {},
    "methods": [
        "personal_sign",
        "eth_sign",
        "eth_signTransaction",
        "eth_signTypedData_v1",
        "eth_signTypedData_v3",
        "eth_signTypedData_v4"
    ],
    "type": "eip155:eoa"
}
  1. Navigate to the E2E Test Dapp and connect the new account
  2. Attempt to perform a method you just removed
  3. You should see a message that "Method [removed method] is not supported for account [new snap account address]"

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

@owencraston owencraston requested a review from a team as a code owner December 15, 2023 19:45
@owencraston owencraston marked this pull request as draft December 15, 2023 19:45
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.

@owencraston owencraston deleted the fix/reject-unsupported-account-methods branch December 18, 2023 20:17
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant