-
Notifications
You must be signed in to change notification settings - Fork 190
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
feat: hide native assets in asset selection modals for limit orders #8121
Conversation
574d29d
to
aed507b
Compare
4c915c8
to
ebc7b62
Compare
aed507b
to
14649b3
Compare
src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx
Outdated
Show resolved
Hide resolved
src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx
Outdated
Show resolved
Hide resolved
src/components/MultiHopTrade/components/TradeInput/TradeInput.tsx
Outdated
Show resolved
Hide resolved
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.
Looks beautiful conceptually - found two issues however from a functional perspective (native asset buys should be available for limit, and Solana related assets are still displayed for limit) as well as one conceptual issue (which may warrant some discussion as to what's our actual intent here).
See testing below.
https://gist.github.com/gomesalexandre/1f8a17be1710e38cc98bf7bfe6e3d9c6
ebc7b62
to
fb8e778
Compare
14649b3
to
290d589
Compare
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.
Retested locally, Solana asset selection looks sane again!
Spotted one bug re: native assets selection for native being broken with the main unfiltered by chain view for limit orders, and also something odd which may or may not be a prod bug re: "My Assets" list not being available when filtering by chain, although it is also present in swapper too, and in develop as well currently.
Spot
Phantom Solana selection ✅
- Solana asset selection is back! 🎉
Chain selection for unsupported buy assets
- Still available ✅
- And still filtered on the sell side ✅
- Still available ✅
Native asset selection
- Still still happy ✅
Limit
Native asset selection is disabled
- Sell side ✅
- Buy side is available 🚫
While native assets are available for search after filtering out by a given chain (e.g filtering by Ethereum chain makes ETH available for search), native assets are not available on
- initial search (without chain filtered)
- popular assets list after filtering by a given chain (but without search terms just yet, i.e these should be available as popular asset)
- additionally, "My Assets" i.e user held balance list, isn't available after filtering by chain and is only available on the main unfiltered view, which is also present in swapper in develop atm
See screenshots below, and Jam which should make it more obvious: https://jam.dev/c/b111cf87-4a45-4d0c-8a9d-7840f3619dc7
d29b227
to
94371cc
Compare
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.
Description
Hides native assets in asset selection for limit orders, as native assets are not supported.
Fixes 2 production bugs:
Issue (if applicable)
closes #6203
Risk
Moderate risk as this makes some minor refactors of the trade asset selection components.
Testing
Thoroughly test asset selection, focusing on trade input and less so on limit orders - trades are user facing and limit orders are behind a feature flag.
Spot Trade
Limit order
Engineering
Operations
Screenshots (if applicable)
Native assets hidden for limit order asset selection:
[phantom wallet] Solana should not appear in the list of assets or chains
Prod:
This PR:
Chains for the "buy" asset which not supported by the wallet should appear in the chain drop-down on the right.
Prod:
This PR: