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

Add AddressInput component #3129

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Add AddressInput component #3129

wants to merge 17 commits into from

Conversation

hmalik88
Copy link
Contributor

Closes #2812

This adds an AddressInput component that takes a CAIP-2 chainId to identify the chain the address needs resolution on and resolves to a display name and avatar (if it exists). The resolution is to be made against the user's own saved accounts.

Copy link

codecov bot commented Feb 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.92%. Comparing base (70a83bd) to head (92e5d83).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3129   +/-   ##
=======================================
  Coverage   94.91%   94.92%           
=======================================
  Files         504      505    +1     
  Lines       11133    11145   +12     
  Branches     1711     1715    +4     
=======================================
+ Hits        10567    10579   +12     
  Misses        566      566           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hmalik88 hmalik88 marked this pull request as ready for review February 18, 2025 23:59
@hmalik88 hmalik88 requested a review from a team as a code owner February 18, 2025 23:59
Copy link
Contributor

@GuillaumeRx GuillaumeRx left a comment

Choose a reason for hiding this comment

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

The state shape of the AddressInput component is a CAIP-10 account ID. When a value prop is passed to the component we should construct the CAIP-10 account ID in state with the chainId prop.

@hmalik88
Copy link
Contributor Author

The state shape of the AddressInput component is a CAIP-10 account ID. When a value prop is passed to the component we should construct the CAIP-10 account ID in state with the chainId prop.

Updated the state

Copy link
Contributor

@GuillaumeRx GuillaumeRx left a comment

Choose a reason for hiding this comment

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

Please also update the type of the state to include CaipAccountIdStruct

Copy link
Contributor Author

Choose a reason for hiding this comment

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

placeholder and disabled weren't in the original ticket for this component, but I think it makes sense to include them.

Copy link
Contributor

@GuillaumeRx GuillaumeRx left a comment

Choose a reason for hiding this comment

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

Code LGTM, waiting for an extension PR

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.

Implement AddressInput component
2 participants