-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
chore: update and fix bugs in asset-picker network modal #28416
base: develop
Are you sure you want to change the base?
Conversation
346e685
to
9ebfc5e
Compare
9ebfc5e
to
c2b403c
Compare
c2b403c
to
2c3a42b
Compare
2c3a42b
to
2eb3e4c
Compare
Builds ready [2eb3e4c]
Page Load Metrics (1858 ± 80 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
}; | ||
|
||
export default function AssetList({ | ||
handleAssetChange, | ||
asset, | ||
tokenList, | ||
isTokenDisabled, | ||
network, |
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.
When would we not require a network here?
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.
When the cross-chain swaps experience is initially loaded a network won't be set for the destination (Bridge to) asset picker: https://www.figma.com/design/IuOIRmU3wI0IdJIfol0ESu/Cross-Chain-Swaps?node-id=159-28072&m=dev
ui/components/multichain/asset-picker-amount/asset-picker-modal/AssetList.tsx
Outdated
Show resolved
Hide resolved
ui/components/multichain/asset-picker-amount/asset-picker-modal/AssetList.tsx
Outdated
Show resolved
Hide resolved
...onents/multichain/asset-picker-amount/asset-picker-modal/asset-picker-modal-network.test.tsx
Outdated
Show resolved
Hide resolved
Builds ready [b22c344]
Page Load Metrics (1951 ± 91 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.
LGTM.
We'll have some conflicts on the Multichain AssetList, but I can address them there.
Description
add
shouldDisableNetwork
prop that determines whether a visible network should be selectableFigma: dest network picker
fix: duplicate component keys cause unexpected search behavior when there are multiple tokens with the same symbol
hide native asset balance when displaying tokens for an inactive network and prevents wrapping balance line
isTokenListLoading
prop displays a loading overlay until the token list is available. The cross-chain swaps experience fetches token lists from the bridge-api, which can take a few seconds after changing the network. Without a loading screen, the user is able to select a token from the previously selected network, which may be invalid in the new networkVideo
Video
change the network picker label to default to
NETWORK_TO_NAME_MAP
instead of the network name for consistencyadd
header
prop for displaying a custom header and implement search functionalityadd a prop for overriding the AssetPicker trigger button with a different component
Related issues
Fixes: N/A
Manual testing steps
The network picker changes can only be tested locally and if other cross-chain swaps changes are pulled into the branch. The only change that could affect the Swap+Send experience is fixing the AssetList keys
CSMATIC
tokens appear and console errors related to keys are no longer visibleScreenshots and Recordings
Pre-merge author checklist
Pre-merge reviewer checklist