Skip to content

Conversation

MoMannn
Copy link
Contributor

@MoMannn MoMannn commented Oct 2, 2025

Description

If permission is being done by an account that has not been transformed to Smart account then we trigger an account upgrade.

Related issues

Depends on: MetaMask/metamask-extension#36452

Manual testing steps

  1. Go localhost:8000
  2. Make sure your account is not a smart account
  3. Grant a new permission
  4. Permission page should show a warning that your account will be upgraded
  5. After clicking grant first a transaction for upgrading the account should show

Screenshots/Recordings

After

Screen.Recording.2025-10-02.at.14.33.28.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

Implements smart account upgrade check/trigger during permission approval and surfaces a UI warning when an account will be upgraded.

  • Core:
    • AccountController: Add getAccountUpgradeStatus (calls wallet_getAccountUpgradeStatus and verifies upgradedAddress vs contracts.eip7702StatelessDeleGatorImpl) and upgradeAccount (calls wallet_upgradeAccount, returns transactionHash).
    • PermissionRequestLifecycleOrchestrator: Before resolving, re-check upgrade status and call upgradeAccount if not upgraded.
  • UI:
    • PermissionHandler: Fetch upgrade status for selected account and pass isAccountUpgraded to content.
    • PermissionHandlerContent: Display warning text when isAccountUpgraded is false; minor token balance prop handling.
  • Chain Metadata:
    • Add contracts.eip7702StatelessDeleGatorImpl address to getChainMetadata.
  • Tests:
    • Add/extend tests for account upgrade status, upgrade flow, orchestrator integration, and UI rendering of the upgrade warning.

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

@mj-kiwi
Copy link
Contributor

mj-kiwi commented Oct 6, 2025

Looks good! I think it’d be better to update the docs to include this new feature.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@MoMannn MoMannn requested a review from mj-kiwi October 7, 2025 14:20
cursor[bot]

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants