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

[3] feat(tokens): tokens list, search and management ui #3191

Merged
merged 9 commits into from
Oct 26, 2023

Conversation

shoom3301
Copy link
Collaborator

@shoom3301 shoom3301 commented Oct 10, 2023

Summary

This PR touches only files in modules/tokensList.
The module is responsible for tokens UI. See cosmos fixtures here.

The first iteration of UI was add here. This PR complements and fixes it.

image image

To Test

Please, test everything in #3201

@vercel
Copy link

vercel bot commented Oct 10, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
swap-dev 🔄 Building (Inspect) Visit Preview Oct 26, 2023 0:38am

🌃 Cosmos ↗︎

@shoom3301 shoom3301 changed the title feat(tokens): tokens list, search and management ui [3] feat(tokens): tokens list, search and management ui Oct 10, 2023
@shoom3301 shoom3301 self-assigned this Oct 10, 2023
@socket-security
Copy link

socket-security bot commented Oct 10, 2023

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
@tanstack/react-virtual 3.0.0-beta.68 None +1 611 kB tannerlinsley

🚮 Removed packages: @types/[email protected], @uniswap/[email protected], [email protected], [email protected], [email protected]

Copy link
Collaborator

@alfetopito alfetopito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few more comments

const bBalance = balances[b.address]

// Native always first
if (getIsNativeToken(a) || getIsNativeToken(b)) return 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this saying, even if b is native, a should come first? (because it returns always 1 when either is native)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's actually unreal situation. We have only one native token in the list

const balance = balances ? balances[token.address] : null

if (balance?.loading || balancesLoading) {
return <styledEl.LoadingRows key={virtualRow.key}>{threeDivs()}</styledEl.LoadingRows>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more than threeDivs (their implementation), is better to describe their function: loadingElement

…ol/cowswap into refactor/token-search-ui

# Conflicts:
#	apps/cowswap-frontend/src/modules/tokensList/pure/ModalHeader/index.tsx
#	apps/cowswap-frontend/src/modules/tokensList/types.ts
#	yarn.lock
* refactor(tokens): integrate TokenLogo component (#3197)

* refactor(tokens): wire up components to new hooks (#3198)

* refactor(tokens): remove Uniswap currency entities usage (#3199)

* refactor(tokens): use new tokens UI and logic by default (#3200)

* fix(tokens): fix e2e tests for tokens updates (#3193)

* refactor(tokens): remove legacy code (#3194)

* fix(tokens): fix tokens list loading state (#3201)
@shoom3301 shoom3301 merged commit 3b6a076 into refactor/tokens-consts Oct 26, 2023
3 of 5 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 26, 2023
@alfetopito alfetopito deleted the refactor/token-search-ui branch October 26, 2023 17:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants