Skip to content

Comments

Implement acceptOwnership UI for UpgradeableRegistrarController#47

Draft
Copilot wants to merge 4 commits intomasterfrom
copilot/add-accept-ownership-functionality
Draft

Implement acceptOwnership UI for UpgradeableRegistrarController#47
Copilot wants to merge 4 commits intomasterfrom
copilot/add-accept-ownership-functionality

Conversation

Copy link

Copilot AI commented Feb 11, 2026

The UpgradeableRegistrarController uses Ownable2Step for ownership transfers, requiring pending owners to explicitly accept. The contract method exists in the ABI but had no UI implementation.

Changes

  • usePendingOwnerStatus: Hook that reads contract state to determine if connected wallet is pending owner
  • useAcceptOwnership: Hook wrapping acceptOwnership() contract call with transaction lifecycle management
  • AcceptOwnershipBanner: Conditional banner in ownership settings displaying accept action when applicable

Usage

When a user is designated as pending owner of the UpgradeableRegistrarController:

// Banner automatically appears in UsernameProfileSettingsOwnership
<AcceptOwnershipBanner />
// Shows current owner, accept button, transaction states
// Hides on transaction success or when not pending owner

The banner integrates with existing wagmi/viem patterns and follows transaction handling conventions used in useWriteContractWithReceipt.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits February 11, 2026 15:22
Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
Copilot AI changed the title [WIP] Add accept ownership functionality Implement acceptOwnership UI for UpgradeableRegistrarController Feb 11, 2026
try {
await acceptOwnership();
} catch (error) {
console.error('Failed to accept ownership:', error);

Check failure

Code scanning / Bearer

Leakage of information in logger message Error

Leakage of information in logger message
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add .gitignore for prive keys

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