fix: MUSD-225 Update "Get mUSD" CTA to respect network filter when creating mUSD conversion tx#24907
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. |
45884b4 to
038e21a
Compare
e110280 to
413ef8e
Compare
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsThe changes are limited to the MusdConversionAssetListCta component in the Earn/Musd feature. The code change improves token selection logic to respect network filters when initiating mUSD conversion - preferring tokens from the selected chain if available, otherwise falling back to the first token. Key observations:
Since there are no E2E tests for this feature and the changes are well-covered by unit tests, running E2E tests would not provide additional coverage for these specific changes. The risk is low as this is a localized UI component change with proper test coverage. |
|



Description
Updated "Get mUSD" CTA to respect network filter when creating mUSD conversion tx. If no supported asset exists on the selected network, we fallback to the first available.
Previously, we ignored the network filter and always selected the first eligible token even if it was on another network.
Changelog
CHANGELOG entry: updated get mUSD cta to respect network filter when creating mUSD conversion tx
Related issues
Fixes: MUSD-225: Buy/Get CTA doesn't take selected chain into account when pre-selecting output chain and payment token
Manual testing steps
Screenshots/Recordings
Before
First eligible token on any chain was selected
After
First eligible token on selected network selected. Falls back to first eligible on any network if user's selected network doesn't have eligible tokens.
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Aligns mUSD conversion to the selected network when available, improving token/chain preselection.
MusdConversionAssetListCtato pickpreferredPaymentTokenfromselectedChainId(falls back totokens[0]) and setsoutputChainIdviagetMusdOutputChainId(paymentToken.chainId)toChecksumAddressandtoHexWritten by Cursor Bugbot for commit f188ad3. This will update automatically on new commits. Configure here.