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

feat: update account name from account details page in wallet-ui #510

Open
wants to merge 13 commits into
base: feat/sf-802
Choose a base branch
from

Conversation

khanti42
Copy link
Collaborator

@khanti42 khanti42 commented Feb 12, 2025

Summary

Screen.Recording.2025-02-12.at.23.11.06.mov

New Features

1. Editable Account Names

  • Users can now rename their accounts directly from the Account Details Modal.
  • Added an inline name editor with a text input field.
  • Changes are saved when clicking a ✔ (check) button or canceled with a (cross) button.
  • The update is persisted using the new setAccountName function.

Code Changes

UI Updates

  • AccountDetailsModal.view.tsx

    • Added an edit mode for account names.
    • Displays an input field when editing
    • Uses setAccountName to persist name changes.
  • AccountDetailsModal.style.ts

    • New styled components for:
      • EditIcon: Edit button (pencil icon).
      • IconButton: Generic button
      • AccountNameInput: Input field for editing the account name.

State & Logic Updates

  • useStarkNetSnap.ts
    • Added setAccountName(chainId, address, accountName), which:
      • Calls the starkNet_setAccountName RPC method.
      • Updates the Redux store with the new name.
      • Sets the updated account as the current account.

@khanti42 khanti42 marked this pull request as ready for review February 12, 2025 22:19
@khanti42 khanti42 requested a review from a team as a code owner February 12, 2025 22:19
@khanti42 khanti42 requested review from Julink-eth and stanleyyconsensys and removed request for a team February 12, 2025 22:19
Copy link

Quality Gate Passed Quality Gate passed for 'consensys_starknet-snap-starknet-snap'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
1.6% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

Copy link

Quality Gate Passed Quality Gate passed for 'consensys_starknet-snap-wallet-ui'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
13.4% Duplication on New Code

See analysis details on SonarQube Cloud

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.

1 participant