Skip to content
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(yield): define token category by default for selection #5018

Merged
merged 111 commits into from
Oct 29, 2024

Conversation

shoom3301
Copy link
Collaborator

Summary

Implementation of the logic described in Figma.

The main logic of this PR is defined in getDefaultTokenListCategories():

  1. When select Sell token and there is any LP-token with balance, then select "Pool tokens" tab by default
  2. When select Sell token and there is NO LP-tokens with balance, then select "All" tab by default
  3. When select Buy token and Sell token is CoWAMM token, then select "Pool tokens" tab by default
  4. When select Buy token and Sell token is LP token but not CoWAMM, then select "CoW AMM only" tab by default
  5. When select Buy token and Sell token is ERC-20 token, then hide "All" tab and select "CoW AMM only" tab by default

To Test

See above

ZeroApprovalWarning and HighFeeWarning
* feat: modify pool token list layout

* feat: apply mobile widgetlinks menu

* feat: add padding to pool token balance

---------

Co-authored-by: Alexandr Kazachenko <[email protected]>
… feat/vampire-attack-lp-tokens

# Conflicts:
#	apps/cowswap-frontend/src/modules/trade/containers/TradeWidget/TradeWidgetForm.tsx
#	apps/cowswap-frontend/src/modules/trade/containers/TradeWidgetLinks/styled.ts
…wprotocol/cowswap into feat/vampire-attack-pools-info

# Conflicts:
#	apps/cowswap-frontend/src/modules/tokensList/containers/LpTokenListsWidget/index.tsx
#	apps/cowswap-frontend/src/modules/tokensList/pure/LpTokenLists/index.tsx
#	apps/cowswap-frontend/src/modules/tokensList/pure/LpTokenLists/styled.ts
…owprotocol/cowswap into feat/vampire-attack-token-selection

# Conflicts:
#	apps/cowswap-frontend/src/modules/tokensList/containers/LpTokenListsWidget/index.tsx
… feat/vampire-attack-pools-info

# Conflicts:
#	apps/cowswap-frontend/src/common/updaters/LpBalancesAndAllowancesUpdater.tsx
#	apps/cowswap-frontend/src/modules/application/containers/App/Updaters.tsx
#	apps/cowswap-frontend/src/modules/tokensList/containers/LpTokenListsWidget/index.tsx
#	apps/cowswap-frontend/src/modules/tokensList/containers/SelectTokenWidget/index.tsx
#	apps/cowswap-frontend/src/modules/tokensList/pure/LpTokenLists/index.tsx
#	apps/cowswap-frontend/src/modules/tokensList/pure/LpTokenLists/styled.ts
#	apps/cowswap-frontend/src/modules/tokensList/pure/SelectTokenModal/index.tsx
#	libs/balances-and-allowances/src/updaters/BalancesAndAllowancesUpdater.tsx
#	libs/tokens/src/const/tokensLists.ts
#	libs/tokens/src/types.ts
… feat/vampire-attack-token-selection

# Conflicts:
#	apps/cowswap-frontend/src/modules/tokensList/containers/LpTokenListsWidget/index.tsx
#	apps/cowswap-frontend/src/modules/tokensList/containers/SelectTokenWidget/index.tsx
#	apps/cowswap-frontend/src/modules/tokensList/pure/SelectTokenModal/index.tsx
#	apps/cowswap-frontend/src/modules/yield/hooks/useLpTokensWithBalances.ts
#	apps/cowswap-frontend/src/modules/yield/shared.ts
#	apps/cowswap-frontend/src/modules/yield/updaters/PoolsInfoUpdater/index.tsx
#	libs/tokens/src/state/tokens/allTokensAtom.ts
#	libs/tokens/src/types.ts
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants