-
Notifications
You must be signed in to change notification settings - Fork 639
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
Reintroduce support for crosschain search results in swaps search #6440
Reintroduce support for crosschain search results in swaps search #6440
Conversation
@@ -4,6 +4,27 @@ import { SearchAsset } from '@/__swaps__/types/search'; | |||
import { Address } from 'viem'; | |||
import { isNativeAsset } from '@/handlers/assets'; | |||
|
|||
export function parseTokenSearchResults(assets: SearchAsset[]): SearchAsset[] { |
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.
added a new function here that will eventually replace / consolidate the other parsers in this file once I finish moving DiscoverSearch over to the new query store.
@@ -77,29 +72,6 @@ export const useTokenSearchStore = createQueryStore<VerifiedTokenData, TokenSear | |||
{ persistThrottleMs: time.seconds(8), storageKey: 'verifiedTokenSearch' } | |||
); | |||
|
|||
export const useUnverifiedTokenSearchStore = createQueryStore<SearchAsset[], TokenSearchParams<TokenLists.HighLiquidity>>( |
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.
this is the removal of the "extra" call for assets on the unverified list - these results will now show up as part of the main call to tokenSearchQueryFunction
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
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.
💯 🥇
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.
QA passed 👍🏽
5651f36
into
@christian/query-store-token-search
Fixes APP-2321
What changed (plus any additional context for devs)
Screen recordings / screenshots
Example showing crosschain results:
![Screenshot 2025-02-02 at 6 05 34 PM](https://private-user-images.githubusercontent.com/1285228/408923656-31e2dd52-734f-439f-8d20-722515ac1c5d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMTQxMzcsIm5iZiI6MTczOTExMzgzNywicGF0aCI6Ii8xMjg1MjI4LzQwODkyMzY1Ni0zMWUyZGQ1Mi03MzRmLTQzOWYtOGQyMC03MjI1MTVhYzFjNWQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDlUMTUxMDM3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OGUyODcwYzQ2NmFmMGM2NWQ3ODEzYzkyMWI1ZWJiNTI3OTk2ODQ5NTFjMjUyM2YzOTE0YzM3OTc2MGNkMDViNyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.v4i9ss0xh-7vxdqeZ9TWyXMoUjdS05zRpNgOrZfb_Xk)
Another example showing crosschain results:
![Screenshot 2025-02-02 at 6 05 25 PM](https://private-user-images.githubusercontent.com/1285228/408923659-7b7e6087-047b-4470-beac-9f806d5afb6f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMTQxMzcsIm5iZiI6MTczOTExMzgzNywicGF0aCI6Ii8xMjg1MjI4LzQwODkyMzY1OS03YjdlNjA4Ny0wNDdiLTQ0NzAtYmVhYy05ZjgwNmQ1YWZiNmYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDlUMTUxMDM3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MmRlZWVjZTEwOGU3YmY0MjQwY2RlYzI5YTNjOTNhMmZjZDU1ZTYxZWQ5ZDRmMDBiNGFhZDQ0MDgxNWJhNGY2ZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.L-OzxK9sBlChXppjWJJ-37zwlPbUqhyu6whpJf72u9g)
Example showing result for address search:
![Screenshot 2025-02-02 at 12 06 50 PM](https://private-user-images.githubusercontent.com/1285228/408923662-16f7ac17-c277-4e27-a4f9-c1942c4bbc45.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMTQxMzcsIm5iZiI6MTczOTExMzgzNywicGF0aCI6Ii8xMjg1MjI4LzQwODkyMzY2Mi0xNmY3YWMxNy1jMjc3LTRlMjctYTRmOS1jMTk0MmM0YmJjNDUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDlUMTUxMDM3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDUyYmE0Y2RiOTZkYWNlNzI3ODI5NzcwNDM2OTFhMzg1YWM2ZjU4NjIzZWIxYWMxYzllOGI5Y2E2NWE5MDU1ZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.YDa8RG_dClqRy06uuiuUaOSev2o_f1YX52vesWu2SJo)
What to test