Hu-Fi / Mr.Market

Mr. Market is the exchange oracle of HuFi, and a CeFi crypto bot on Mixin Messenger
https://mr-market-one.vercel.app
GNU Affero General Public License v3.0
1 stars 6 forks source link

Add market page filtering #73

Closed zed-wong closed 3 months ago

zed-wong commented 3 months ago

In /home page and /market/token page. the filtering is still a placeholder for now. we need to implement a way to filter these tokens that get from coingecko market api by category.

Related file: interface/src/lib/components/home/markets/coins.svelte interface/src/routes/(bottomNav)/(market)/market/token/+page.svelte

piotrswierzy commented 3 months ago

We started working on it

silkshjasuwienas commented 3 months ago

@zed-wong Do we have any mockups presenting how this filter should look like? My current proposal is based on the tabular view of currently displayed tabs, but perhaps you would prefer a select, checkboxes, radio?

Screenshot 2024-04-02 at 08 28 23

zed-wong commented 3 months ago

@zed-wong Do we have any mockups presenting how this filter should look like? My current proposal is based on the tabular view of currently displayed tabs, but perhaps you would prefer a select, checkboxes, radio?

Screenshot 2024-04-02 at 08 28 23

@silkshjasuwienas Actually the first line of the filter is not implemented, we just need to implement the first line. like filter the tokens by Mainstream, layer1 and so on. We don't need a second filter.

silkshjasuwienas commented 3 months ago

@zed-wong There is one issue https://github.com/samuraitruong/coingecko-api-v3/blob/main/src/CoinGeckoClient.ts#L230 seems to support defi and stable coin categories only.

What approach should we consider? Writing our own client? Ignoring types and see what happens? Preparing pull request for this coingecko module? Or creating our fork from it?

zed-wong commented 3 months ago

@zed-wong There is one issue https://github.com/samuraitruong/coingecko-api-v3/blob/main/src/CoinGeckoClient.ts#L230 seems to support defi and stable coin categories only.

What approach should we consider? Writing our own client? Ignoring types and see what happens? Preparing pull request for this coingecko module? Or creating our fork from it?

@silkshjasuwienas Sorry for the delay, I think we can try ignoring types first, if it doesn't work we can write a custom coinMarkets function. And if it still doesn't work, we can hardcode a list of tokens for each type and filter based on that.

piotrswierzy commented 3 months ago

Done. Time spent: 3 hours Merged PR: https://github.com/Hu-Fi/Mr.Market/pull/117

ansaqib commented 3 months ago

Thanks @piotrswierzy