Repository navigation
feat(contact): multi-address contact support - #92
Merged
Merged
Conversation
- Add 09-联系人服务 section to white-book - Multi-address contact model - Address format detection - Contact suggestions in address input - Integration with transfer flow - Update 实现规范 with SDK integration details - BioForest SDK structure - Pay password flow diagram - Add address-format.ts utility (WIP)
Core changes: - Contact now has 'addresses: ContactAddress[]' instead of 'address: string' - Each ContactAddress has chainType, label, isDefault - Added data migration from v1 (single address) to v2 (multi address) - Updated addressBookSelectors with suggestContacts() - Updated ContactEditJob, TransferTab, AddressBookPage - Added address-format detection utility Still TODO: - Update test files (address-book, migration, stories) - Add AddressInput contact suggestions component - Create PR
Changes: - Contact now uses addresses: ContactAddress[] instead of single address - Each ContactAddress has id, address, chainType, label (optional), isDefault - Added data migration from v1 (single address) to v2 (multi address) - Added addressBookSelectors.getDefaultAddress() and suggestContacts() - Created address-format.ts with detectAddressFormat() utility - Updated all tests, stories, and dependent components - All 1382 tests pass
- Initialize address book from storage in AddressBookPage - Add e2e test for address-book with contacts - Add e2e test for multi-address contact display - Update screenshots for all page tests
- Shows dropdown with matching contacts when typing - Supports filtering by chainType - Keyboard navigation (Arrow Up/Down, Enter, Escape) - Added WithContactSuggestions story
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds multi-address support to the Contact model, allowing one contact to have multiple addresses for different chains.
Changes
Documentation
docs/white-book/04-服务篇/09-联系人服务/index.md- Contact service documentationdocs/white-book/04-服务篇/02-链服务/实现规范/index.md- SDK integration docsContact Model Update
address: stringtoaddresses: ContactAddress[]id,address,chainType,label(optional),isDefaultNew Features
addressBookSelectors.getDefaultAddress(contact, chainType?)- Get preferred address for a chainaddressBookSelectors.suggestContacts(state, input)- Get contact suggestions for address inputdetectAddressFormat(address)- Detect chain type from address format (Ethereum, TRON, Bitcoin, BioForest)Component Updates
getDefaultAddressfor quick contactsTests
Screenshots
Address Book - Empty
Address Book - With Contacts
Shows multi-address indicator (+1, +2) for contacts with multiple addresses.

TODO (Future PR)