-
Notifications
You must be signed in to change notification settings - Fork 5.2k
feat: allows pasting external addresses for crosschain bridges #30995
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
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Builds ready [a895d3c]
Page Load Metrics (4262 ± 1809 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [0338d57]
Page Load Metrics (4489 ± 1927 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [5b9e54b]
Page Load Metrics (2753 ± 984 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
ui/pages/bridge/prepare/components/destination-account-picker.tsx
Outdated
Show resolved
Hide resolved
Builds ready [89b03bb]
Page Load Metrics (2616 ± 395 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
ui/pages/bridge/prepare/components/destination-selected-account-list-item.tsx
Outdated
Show resolved
Hide resolved
ui/pages/bridge/prepare/components/external-account-list-item.tsx
Outdated
Show resolved
Hide resolved
ui/pages/bridge/prepare/components/external-account-list-item.tsx
Outdated
Show resolved
Hide resolved
Builds ready [fd172ee]
Page Load Metrics (3959 ± 1850 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [84a8f23]
Page Load Metrics (2705 ± 473 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds functionality to support pasting external addresses for crosschain bridges, allowing users with a Solana account to either select from their accounts or paste an external account.
- Introduces a new ExternalAccountListItem component to render external accounts.
- Adds types for ExternalAccount and a union type DestinationAccount.
- Updates the destination account picker and selected account list item components to support both internal and external accounts, and adjusts the account hook accordingly.
Reviewed Changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
ui/pages/bridge/prepare/components/external-account-list-item.tsx | New component to display external account details |
ui/pages/bridge/prepare/types.ts | Introduces ExternalAccount and DestinationAccount types |
ui/pages/bridge/prepare/components/destination-account-picker.tsx | Integrates external account creation and selection logic |
ui/pages/bridge/prepare/components/destination-selected-account-list-item.tsx | Adjusts display logic based on account type |
ui/pages/bridge/hooks/useDestinationAccount.ts | Updates state type to DestinationAccount (state destructuring issue) |
Files not reviewed (2)
- app/_locales/en/messages.json: Language not supported
- app/_locales/en_GB/messages.json: Language not supported
Comments suppressed due to low confidence (1)
ui/pages/bridge/hooks/useDestinationAccount.ts:19
- The state initialization is missing a destructuring assignment. Please update it to '[selectedDestinationAccount, setSelectedDestinationAccount] = useState<DestinationAccount | null>(null);' to properly capture and use the state.
useState<DestinationAccount | null>(null);
Description
• If user has no Solana account: no external account pasting option
• If user has Solana account: user can select dropdown any Solana accounts they have, and otherwise paste in an external account for dest account
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/MMS-2103
Manual testing steps
Screenshots/Recordings
Before
After
Screen.Recording.2025-03-18.at.1.33.24.PM.mov
Pre-merge author checklist
Pre-merge reviewer checklist