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

Show USD values for Stacks FTs #4653

Closed
314159265359879 opened this issue Dec 6, 2023 · 10 comments · Fixed by #5151
Closed

Show USD values for Stacks FTs #4653

314159265359879 opened this issue Dec 6, 2023 · 10 comments · Fixed by #5151
Assignees
Labels
area:balances area:brc20 area:stacks-fts Issues related to fungible tokens (FTs) area:tokens enhancement enhancement-p4 Non-critical functionality wanted by few users, or there are clear alternatives

Comments

@314159265359879
Copy link
Contributor

No description provided.

@314159265359879 314159265359879 added Enhancement 💡 enhancement-p4 Non-critical functionality wanted by few users, or there are clear alternatives labels Dec 6, 2023
@markmhendrickson markmhendrickson changed the title Show dollar or BTC value for other tokens (SIP010, BRC20 etc) when available via a reliable API Show USD values for Stacks FT and BRC-20 tokens Mar 5, 2024
@markmhendrickson
Copy link
Collaborator

@alter-eggo @fbwoolf Might one of you want to take this using the ALEX SDK for Stacks FTs and another for BRC-20 ones (e.g. perhaps Best in Slot, UniSat or CoinMarketCap's API)? It seems like a possible quick win ahead of redesigning the tokens UX in general.

Note that in addition to showing the USD values per token, we'd want to incorporate their values in the account total as well.

@fbwoolf
Copy link
Contributor

fbwoolf commented Mar 12, 2024

Yep, sure, I can take it after my UI issues.

@fbwoolf fbwoolf self-assigned this Mar 12, 2024
@markmhendrickson markmhendrickson added this to the Redesign tokens UX milestone Mar 15, 2024
@markmhendrickson markmhendrickson changed the title Show USD values for Stacks FT and BRC-20 tokens Show USD values for Stacks FTs Mar 15, 2024
@fbwoolf
Copy link
Contributor

fbwoolf commented Mar 26, 2024

@markmhendrickson is it ok just to handle what is returned by the alex-sdk for fiat prices?

{
    "age000-governance-token": 0.44284066666666666,
    "token-wusda": 0,
    "token-wstx": 3.48,
    "token-wban": 0.28039518,
    "token-wbtc": 69583.66666666667,
    "token-wdiko": 0.57905493,
    "token-wslm": 0.02933197,
    "token-wxusd": 0.9995446666666666,
    "token-wmia": 0,
    "token-wnycc": 0,
    "token-wcorgi": 0.00782047,
    "auto-alex-v2": 0.45748425875749976,
    "token-susdt": 1,
    "token-wvibes": 0.003541152750025805,
    "token-abtc": 68266.77159157977,
    "token-slunr": 0.23096300000000003,
    "brc20-chax": 0.00235852843073116,
    "token-wleo": 0.001848988570889095,
    "token-wmega-v2": 0.9843567751715196,
    "token-wgus": 0.00015734427742962597,
    "brc20-ordg": 0.3628395646699813,
    "brc20-ormm": 0.00028785
}

@markmhendrickson
Copy link
Collaborator

Yep that works

@fbwoolf
Copy link
Contributor

fbwoolf commented Mar 28, 2024

@fabric-8 there are so many tokens being airdropped into wallets that don't have a fiat conversion available, should I just not show anything for now if $0.00?

Screenshot 2024-03-27 at 8 24 29 PM

@fabric-8
Copy link
Contributor

fabric-8 commented Mar 28, 2024

I think displaying 0$ is ok, people might otherwise wonder wether any given token might actually be worth something and start looking around.

The more fundamental issue which we'll address is to not display spammy tokens in first place or give the user the option to hide those. I think we're planning to do that, @kyranjamie @markmhendrickson discussed this earlier this week

btw: can we just do $0 without the decimals? Makes it a bit faster to parse / less noisy :)

@markmhendrickson
Copy link
Collaborator

Let's just show blank? It's best not to give the impression that we know the value (or lack thereof) if we simply don't have the data

@fabric-8
Copy link
Contributor

Ah, is there a difference between an unknown value and 0? I was assuming that we or the service we're using "knows" that the fiat value is 0

@fbwoolf
Copy link
Contributor

fbwoolf commented Mar 28, 2024

Ah, is there a difference between an unknown value and 0? I was assuming that we or the service we're using "knows" that the fiat value is 0

There is a difference in that that alex-sdk only returns data for a hand full of tokens, the others have no market data.

@fabric-8
Copy link
Contributor

ok thanks for clarifying - Agree with Mark then 👍

kyranjamie pushed a commit that referenced this issue Apr 10, 2024
## [6.33.0](v6.32.1...v6.33.0) (2024-04-10)

### Features

* add balances shimmer loader, closes [#5119](#5119) ([5c1c284](5c1c284))
* add src-20 token balances, closes [#3751](#3751) ([fb859b6](fb859b6))
* add stacks balance loader ([20418ab](20418ab))
* change query persister to chrome storage, closes [#5153](#5153) ([1cd2625](1cd2625))
* compliance checks ([6df0869](6df0869))
* stacks ft fiat values from alex-sdk, closes [#4653](#4653) ([0f7e44e](0f7e44e))
* support multiple recipients in rpc send transfer method, closes [#5174](#5174) ([a470a57](a470a57))

### Bug Fixes

* add border to onboarding form ([a6bda2d](a6bda2d))
* container when resized ([909fa0c](909fa0c))
* dependabot ([d927ec0](d927ec0))
* deprecate InfoCard to add border correctly ([b6864cd](b6864cd))
* fix routing issues with send flow ([f32151d](f32151d))
* only show messages on homepage ([8228c11](8228c11))
* refetch brc20 tokens on window focus ([a985e0f](a985e0f))
* shimmer styles import ([868ee71](868ee71))
* swap test ([85eb975](85eb975))
* swap toggle with new routing ([f179f3e](f179f3e))
* use signed stacks account in transaction [#4923](#4923) ([6dca269](6dca269))

### Internal

* Add wallet user survey, adjust styling ([3c242cf](3c242cf))
* disable compliance check ([b4b1d11](b4b1d11))
* fmt ([a937795](a937795))
* implement fix to limit amount of accounts rendered ([629ef97](629ef97))
* post-release merge back ([3c9c0f8](3c9c0f8))
* replace drawer dialog, containers and global header footers, onboarding, settings, ref [#4371](#4371) ([6262267](6262267))
* swaps routes, closes [#4317](#4317) ([70c51a1](70c51a1))
* ugprade dev packages ([4ed8326](4ed8326))
* update express, ref [#5130](#5130) ([264bf8d](264bf8d))
* update prettier package ([e75990f](e75990f))
* update stx avatar ([03fe093](03fe093))
* update undici, ref [#4956](#4956) ([8019e0d](8019e0d))
* update webpack + axios, ref [#5090](#5090) ([77803f5](77803f5))
* upgrade redux toolkit, redux ([2eb8090](2eb8090))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:balances area:brc20 area:stacks-fts Issues related to fungible tokens (FTs) area:tokens enhancement enhancement-p4 Non-critical functionality wanted by few users, or there are clear alternatives
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants